<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head><title>2022-07-17 The BUSY Build System - Language and Built-ins Specification</title>
<style type="text/css" media="screen, projection, print">
body{font-family:Arial,sans-serif;font-size:small;orphans:2;widows:2;}
h1,h2,h3,h4{background-color:#F5F5F5;padding:0.3em;page-break-after:avoid;margin:0;border-style:solid;border-color:white #F5F5F5 #F5F5F5 #F5F5F5;border-width:thin;}
span.label{position:absolute;top:auto;left:0;margin-top:0.2em;font-size:smaller;color:darkblue; }
span.ident{background-color:aliceblue;font-weight:bold;padding:0 0.2em 0 0.2em;}
a[href^="#"]{text-decoration:none;font-weight:normal;color:darkblue;background-color:#F5F5F5;}
div{border-style:none solid solid solid;border-width:thin;border-color:#F5F5F5;margin:0;padding:0.3em;}
ol,ul{margin:0;}
</style>
</head><body>
<div style="margin-left:9px"><span class="label"><a name="12973">1</a></span>
<img alt="<embedded image>" src="" /></div>
<h4 style="margin-left:9px"><span class="label"><a name="11863">2</a></span>
Front Matter</h4>
<h4 style="margin-left:27px"><span class="label"><a name="11942">2.1</a></span>
Title</h4>
<div style="margin-left:45px"><span class="label"><a name="11943">2.1.1</a></span>
The BUSY Build System - Language and Built-ins Specification</div>
<h4 style="margin-left:27px"><span class="label"><a name="11953">2.2</a></span>
Version</h4>
<div style="margin-left:45px"><span class="label"><a name="11954">2.2.1</a></span>
2023-02-12</div>
<h4 style="margin-left:27px"><span class="label"><a name="11944">2.3</a></span>
Author</h4>
<div style="margin-left:45px"><span class="label"><a name="11945">2.3.1</a></span>
me@rochus-keller.ch</div>
<h4 style="margin-left:27px"><span class="label"><a name="11940">2.4</a></span>
<b>Additional Credits</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11864">2.4.1</a></span>
The sections <a href="#11631">4 Predeclared Class Reference</a> and <a href="#11697">5 Predeclared  Field Reference</a> are derived from the help text included in GN (<a href="https://gn.googlesource.com/gn/"><u>gn.googlesource.com/.../</u></a> as of July 2019), copyright (c) 2013 by The Chromium Authors, made available under a BSD-style license.</div>
<div style="margin-left:45px"><span class="label"><a name="12207">2.4.2</a></span>
A lot of text is derived from the Oberon+ language specification, <a href="https://github.com/oberon-lang/specification"><u>github.com/.../specification</u></a></div>
<div style="margin-left:45px"><span class="label"><a name="12974">2.4.3</a></span>
This specification was written in CrossLine (see <a href="https://github.com/rochus-keller/CrossLine"><u>github.com/.../CrossLine</u></a>)</div>
<h4 style="margin-left:27px"><span class="label"><a name="12253">2.5</a></span>
<b>Table of Contents</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12260">2.5.1</a></span>
<a href="#11632">3 Language Specification</a></div>
<div style="margin-left:63px"><span class="label"><a name="12261">2.5.1.1</a></span>
<a href="#11720">3.1 Introduction</a></div>
<div style="margin-left:63px"><span class="label"><a name="12262">2.5.1.2</a></span>
<a href="#12059">3.2 Syntax</a></div>
<div style="margin-left:63px"><span class="label"><a name="12263">2.5.1.3</a></span>
<a href="#12066">3.3 Vocabulary and Representation</a></div>
<div style="margin-left:81px"><span class="label"><a name="12264">2.5.1.3.1</a></span>
<a href="#12069">3.3.3 Identifiers</a></div>
<div style="margin-left:81px"><span class="label"><a name="12265">2.5.1.3.2</a></span>
<a href="#12081">3.3.4 Booleans</a></div>
<div style="margin-left:81px"><span class="label"><a name="12266">2.5.1.3.3</a></span>
<a href="#12071">3.3.5 Numbers</a></div>
<div style="margin-left:81px"><span class="label"><a name="12267">2.5.1.3.4</a></span>
<a href="#12074">3.3.6 Strings</a></div>
<div style="margin-left:81px"><span class="label"><a name="12268">2.5.1.3.5</a></span>
<a href="#12078">3.3.7 Symbols</a></div>
<div style="margin-left:81px"><span class="label"><a name="12269">2.5.1.3.6</a></span>
<a href="#12080">3.3.8 Paths</a></div>
<div style="margin-left:81px"><span class="label"><a name="12270">2.5.1.3.7</a></span>
<a href="#12099">3.3.9 Operators and Delimiters</a></div>
<div style="margin-left:81px"><span class="label"><a name="12271">2.5.1.3.8</a></span>
<a href="#12103">3.3.10 Reserved Words</a></div>
<div style="margin-left:81px"><span class="label"><a name="12272">2.5.1.3.9</a></span>
<a href="#12107">3.3.11 Comments</a></div>
<div style="margin-left:63px"><span class="label"><a name="12273">2.5.1.4</a></span>
<a href="#12109">3.4 Declarations and scope rules</a></div>
<div style="margin-left:63px"><span class="label"><a name="12274">2.5.1.5</a></span>
<a href="#12048">3.5 Type declarations</a></div>
<div style="margin-left:81px"><span class="label"><a name="12275">2.5.1.5.1</a></span>
<a href="#12120">3.5.3 Basic types</a></div>
<div style="margin-left:81px"><span class="label"><a name="12276">2.5.1.5.2</a></span>
<a href="#12130">3.5.4 Class types</a></div>
<div style="margin-left:81px"><span class="label"><a name="12277">2.5.1.5.3</a></span>
<a href="#12137">3.5.5 Enumeration types</a></div>
<div style="margin-left:81px"><span class="label"><a name="12278">2.5.1.5.4</a></span>
<a href="#12139">3.5.6 List types</a></div>
<div style="margin-left:63px"><span class="label"><a name="12279">2.5.1.6</a></span>
<a href="#12151">3.6 Variable declarations</a></div>
<div style="margin-left:63px"><span class="label"><a name="12280">2.5.1.7</a></span>
<a href="#12167">3.7 Expressions</a></div>
<div style="margin-left:81px"><span class="label"><a name="12281">2.5.1.7.1</a></span>
<a href="#12196">3.7.2 Operands</a></div>
<div style="margin-left:81px"><span class="label"><a name="12282">2.5.1.7.2</a></span>
<a href="#12204">3.7.3 Operators</a></div>
<div style="margin-left:99px"><span class="label"><a name="12283">2.5.1.7.2.1</a></span>
<a href="#12217">3.7.3.3 Logical operators</a></div>
<div style="margin-left:99px"><span class="label"><a name="12284">2.5.1.7.2.2</a></span>
<a href="#12220">3.7.3.4 Arithmetic operators</a></div>
<div style="margin-left:99px"><span class="label"><a name="12285">2.5.1.7.2.3</a></span>
<a href="#12224">3.7.3.5 Relations</a></div>
<div style="margin-left:99px"><span class="label"><a name="12286">2.5.1.7.2.4</a></span>
<a href="#12230">3.7.3.7 Function Call</a></div>
<div style="margin-left:63px"><span class="label"><a name="12287">2.5.1.8</a></span>
<a href="#12168">3.8 Statements</a></div>
<div style="margin-left:63px"><span class="label"><a name="12575">2.5.1.9</a></span>
<a href="#12570">3.9 Macros</a></div>
<div style="margin-left:63px"><span class="label"><a name="12288">2.5.1.10</a></span>
<a href="#12169">3.10 Modules</a></div>
<div style="margin-left:63px"><span class="label"><a name="12289">2.5.1.11</a></span>
<a href="#12241">3.11 Alternative Syntax</a></div>
<div style="margin-left:45px"><span class="label"><a name="12290">2.5.2</a></span>
<a href="#11631">4 Predeclared Class Reference</a></div>
<div style="margin-left:63px"><span class="label"><a name="12291">2.5.2.1</a></span>
<a href="#11686">4.1 Config</a></div>
<div style="margin-left:63px"><span class="label"><a name="12292">2.5.2.2</a></span>
<a href="#11676">4.2 Product</a></div>
<div style="margin-left:81px"><span class="label"><a name="12293">2.5.2.2.1</a></span>
<a href="#11677">4.2.3 ConfigurableProduct</a></div>
<div style="margin-left:99px"><span class="label"><a name="12294">2.5.2.2.1.1</a></span>
<a href="#11661">4.2.3.1 CompiledProduct</a></div>
<div style="margin-left:117px"><span class="label"><a name="12295">2.5.2.2.1.1.1</a></span>
<a href="#11633">4.2.3.1.4 Executable</a></div>
<div style="margin-left:117px"><span class="label"><a name="12296">2.5.2.2.1.1.2</a></span>
<a href="#11662">4.2.3.1.5 Library</a></div>
<div style="margin-left:117px"><span class="label"><a name="12297">2.5.2.2.1.1.3</a></span>
<a href="#11647">4.2.3.1.6 SourceSet</a></div>
<div style="margin-left:81px"><span class="label"><a name="12298">2.5.2.2.2</a></span>
<a href="#11671">4.2.4 Group</a></div>
<div style="margin-left:81px"><span class="label"><a name="12299">2.5.2.2.3</a></span>
<a href="#11678">4.2.5 Action</a></div>
<div style="margin-left:99px"><span class="label"><a name="12300">2.5.2.2.3.1</a></span>
<a href="#11949">4.2.5.1 Script</a></div>
<div style="margin-left:117px"><span class="label"><a name="12301">2.5.2.2.3.1.1</a></span>
<a href="#11679">4.2.5.1.2 LuaScript</a></div>
<div style="margin-left:117px"><span class="label"><a name="12302">2.5.2.2.3.1.2</a></span>
<a href="#11681">4.2.5.1.3 LuaScriptForeach</a></div>
<div style="margin-left:99px"><span class="label"><a name="12638">2.5.2.2.3.2</a></span>
<a href="#12590">4.2.5.2 Message</a></div>
<div style="margin-left:99px"><span class="label"><a name="12640">2.5.2.2.3.3</a></span>
<a href="#12625">4.2.5.3 Moc</a></div>
<div style="margin-left:99px"><span class="label"><a name="12641">2.5.2.2.3.4</a></span>
<a href="#12635">4.2.5.4 Rcc</a></div>
<div style="margin-left:99px"><span class="label"><a name="12303">2.5.2.2.3.5</a></span>
<a href="#11893">4.2.5.6 Copy</a></div>
<div style="margin-left:45px"><span class="label"><a name="12305">2.5.3</a></span>
<a href="#11697">5 Predeclared  Field Reference</a></div>
<div style="margin-left:45px"><span class="label"><a name="12343">2.5.4</a></span>
<a href="#11934">6 Predeclared Enumeration Reference</a></div>
<div style="margin-left:45px"><span class="label"><a name="12344">2.5.5</a></span>
<a href="#11920">7 Predeclared  Variable Reference</a></div>
<div style="margin-left:45px"><span class="label"><a name="12345">2.5.6</a></span>
<a href="#11996">8 Predeclared  Procedure Reference</a></div>
<h4 style="margin-left:9px"><span class="label"><a name="11632">3</a></span>
Language Specification</h4>
<h4 style="margin-left:27px"><span class="label"><a name="11720">3.1</a></span>
<b>Introduction</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12056">3.1.1</a></span>
BUSY (for <i>BU</i>ild <i>SY</i>stem) is a lean, cross-platform build system with very little system requirements and easy bootsrapping.</div>
<div style="margin-left:45px"><span class="label"><a name="12057">3.1.2</a></span>
The BUSY build specifcation language features modularity, information hiding, static typing with strong type checking, immutability and garbage collection. The language is not a full programming language by intention.</div>
<div style="margin-left:45px"><span class="label"><a name="12058">3.1.3</a></span>
This report is not intended as a programmer’s tutorial. It is intentionally kept concise. Its function is to serve as a reference for programmers, implementors, and tutorial writers. What remains unsaid is mostly left so intentionally, either because it can be derived from stated rules of the language, or because it would require to commit the definition when a general commitment appears as unwise.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12059">3.2</a></span>
<a href=""><b>S</b></a><b>yntax</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12060">3.2.1</a></span>
An extended Backus-Naur Formalism (EBNF) is used to describe the syntax of BUSY:</div>
<div style="margin-left:63px"><span class="label"><a name="12061">3.2.1.1</a></span>
Alternatives are separated by <b>|</b>.</div>
<div style="margin-left:63px"><span class="label"><a name="12062">3.2.1.2</a></span>
Brackets <b>[</b> and <b>]</b> denote optionality of the enclosed expression.</div>
<div style="margin-left:63px"><span class="label"><a name="12063">3.2.1.3</a></span>
Braces <b>{</b> and <b>}</b> denote its repetition (possibly 0 times).</div>
<div style="margin-left:63px"><span class="label"><a name="12064">3.2.1.4</a></span>
Syntactic entities (non-terminal symbols) are denoted by English words expressing their intuitive meaning.</div>
<div style="margin-left:63px"><span class="label"><a name="12065">3.2.1.5</a></span>
Symbols of the language vocabulary (terminal symbols) are denoted by strings formatted in bold face.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12066">3.3</a></span>
Vocabulary and Representation</h4>
<div style="margin-left:45px"><span class="label"><a name="12067">3.3.1</a></span>
BUSY source code is a string of characters encoded using the UTF-8 variable-width encoding as defined in ISO/IEC 10646. Numbers, operators, keywords and delimiters are represented using the ASCII character set; identifiers, strings, symbols, paths and comments are represented using the Unicode Basic Multilingual Plane (BMP, plane 0, as defined in ISO/IEC 10646) character set.</div>
<div style="margin-left:45px"><span class="label"><a name="12068">3.3.2</a></span>
The following lexical rules apply: blanks and line breaks must not occur within symbols (except in block comments, and blanks in strings); they are ignored unless they are essential to separate two consecutive symbols. Capital and lower-case letters are considered as distinct.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12069">3.3.3</a></span>
Identifiers</h4>
<div style="margin-left:63px"><span class="label"><a name="12070">3.3.3.1</a></span>
Identifiers are sequences of unicode letters, unicode digits and underscore. The first character must be a unicode letter or an underscore.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12081">3.3.4</a></span>
<b>Booleans</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12082">3.3.4.1</a></span>
Boolean literals are represented by the keywords <b>true</b> and <b>false</b>.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12071">3.3.5</a></span>
<a href=""><b>N</b></a><b>umbers</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12072">3.3.5.1</a></span>
Number literals are (unsigned) integer or real constants. If the literal is specified with the prefix <b>0x</b>, the representation is hexadecimal, otherwise the representation is decimal. </div>
<div style="margin-left:63px"><span class="label"><a name="12073">3.3.5.2</a></span>
A real number always contains a decimal point and at least one digit before the point. Optionally it may also contain a decimal scale factor. The letter <b>e</b> means <i>times ten to the power of</i>. </div>
<h4 style="margin-left:45px"><span class="label"><a name="12074">3.3.6</a></span>
Strings</h4>
<div style="margin-left:63px"><span class="label"><a name="12075">3.3.6.1</a></span>
Strings are sequences of printable unicode characters enclosed in <b>"</b> (quote marks). A string may extend over the end of a line; the enclosed end of line characters are part of the string. Strings use backslash as the escape character. The only escape sequences supported are: </div>
<div style="margin-left:81px"><span class="label"><a name="12076">3.3.6.1.1</a></span>
<b>\"</b> (for literal quote)</div>
<div style="margin-left:81px"><span class="label"><a name="12077">3.3.6.1.2</a></span>
<b>\\</b> (for literal backslash)</div>
<h4 style="margin-left:45px"><span class="label"><a name="12078">3.3.7</a></span>
<b>Symbols</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12079">3.3.7.1</a></span>
Symbols are interned strings consisting of unicode letters, unicode digits and underscores; symbols are prefixed by <b>`</b> (backquote, ASCII 0x60).</div>
<h4 style="margin-left:45px"><span class="label"><a name="12080">3.3.8</a></span>
Paths</h4>
<div style="margin-left:63px"><span class="label"><a name="12083">3.3.8.1</a></span>
A path is an abstraction of a file system absolute or relative file or directory path. A path is a sequence of zero or more name segments, separated by the <b>/</b> (slash) character, with a path prefix. The current module is the reference for relative path resolution (see <a href="#12169">3.10 Modules</a>). The following path prefixes are supported:</div>
<div style="margin-left:81px"><span class="label"><a name="12084">3.3.8.1.1</a></span>
<b>//</b> (for an absolute path in Unix file systems)</div>
<div style="margin-left:81px"><span class="label"><a name="12097">3.3.8.1.2</a></span>
a <b>//</b> followed by one ASCII letter followed by one <b>:</b> (colon, for an absolute path in Windows file systems)</div>
<div style="margin-left:81px"><span class="label"><a name="12085">3.3.8.1.3</a></span>
<b>./</b> (for a path relative to the directory represented by the current module)</div>
<div style="margin-left:81px"><span class="label"><a name="12086">3.3.8.1.4</a></span>
<b>../</b> (for a path relative to the directory immediately above the directory represented by the current module)</div>
<div style="margin-left:81px"><span class="label"><a name="12095">3.3.8.1.5</a></span>
a sequence of two or more <b>../</b></div>
<div style="margin-left:63px"><span class="label"><a name="12088">3.3.8.2</a></span>
A name segment consists of a sequence of one or more printable unicode characters. A name segment cannot include the following characters: <b>/ \ ? * : | " &lt; &gt; , ; =</b> . A name segment cannot include sequences of <b>.</b> (dot).</div>
<div style="margin-left:63px"><span class="label"><a name="12090">3.3.8.3</a></span>
If a name segment includes unicode characters which qualify as white space (blanks), the path must be enclosed in <b>'</b> (tick marks); line breaks in name segments are not allowed.</div>
<div style="margin-left:63px"><span class="label"><a name="12091">3.3.8.4</a></span>
If a path is enclosed in <b>'</b> (tick marks), the <b>./</b> path prefix is optional.</div>
<div style="margin-left:63px"><span class="label"><a name="12089">3.3.8.5</a></span>
As a special case, a path may consist only of one of the following character combinations:</div>
<div style="margin-left:81px"><span class="label"><a name="12092">3.3.8.5.1</a></span>
<b>//</b> (for the absolute root in a Unix file system)</div>
<div style="margin-left:81px"><span class="label"><a name="12098">3.3.8.5.2</a></span>
a <b>//</b> followed by one ASCII letter followed by one <b>:</b> (colon, for the absolute root in a Windows file system)</div>
<div style="margin-left:81px"><span class="label"><a name="12093">3.3.8.5.3</a></span>
<b>.</b> (for the directory represented by the current module)</div>
<div style="margin-left:81px"><span class="label"><a name="12094">3.3.8.5.4</a></span>
<b>..</b> (for the directory immediately above directory represented by the current module)</div>
<div style="margin-left:81px"><span class="label"><a name="12096">3.3.8.5.5</a></span>
a sequence of one or more <b>../</b> followed by <b>..</b></div>
<h4 style="margin-left:45px"><span class="label"><a name="12099">3.3.9</a></span>
<a href=""><b>O</b></a><b>perators and Delimiters</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12100">3.3.9.1</a></span>
Operators and delimiters are the special characters, or character pairs listed here:</div>
<div style="margin-left:81px"><span class="label"><a name="12101">3.3.9.1.1</a></span>
<b>! != # % &amp;&amp; || ( ) * /* */ *= -= += + - ; , . / : := &lt; &lt;= = == &gt; &gt;= ? [ ] [] ^ ` { }</b></div>
<h4 style="margin-left:45px"><span class="label"><a name="12103">3.3.10</a></span>
<a href=""><b>R</b></a><b>eserved Words</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12102">3.3.10.1</a></span>
The reserved words (keywords) consist of all lower case letters and cannot be used as identifiers. All words listed here are reserved:</div>
<div style="margin-left:81px"><span class="label"><a name="12104">3.3.10.1.1</a></span>
<b>begin class else elsif end false if in let param submod submodule then true type var </b></div>
<div style="margin-left:63px"><span class="label"><a name="12105">3.3.10.2</a></span>
In addition the following words are reserved for future extensions:</div>
<div style="margin-left:81px"><span class="label"><a name="12106">3.3.10.2.1</a></span>
<b>include import is module</b></div>
<div style="margin-left:63px"><span class="label"><a name="12566">3.3.10.3</a></span>
Deprecated:</div>
<div style="margin-left:81px"><span class="label"><a name="12567">3.3.10.3.1</a></span>
<b>subdir</b></div>
<h4 style="margin-left:45px"><span class="label"><a name="12107">3.3.11</a></span>
<a href=""><b>C</b></a><b>omments</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12108">3.3.11.1</a></span>
Comments are arbitrary character sequences opened by the bracket <b>/</b><b><code>*</code></b> and closed by <b><code>*/</code></b>. Comments may be nested. They do not affect the meaning of a program. BUSY also supports line comments; text starting with <b><code>#</code></b> up to a line break is considered a comment.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12109">3.4</a></span>
<a href=""><b>D</b></a><b>eclarations and scope rules</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12110">3.4.1</a></span>
Every identifier occurring in a BUSY file must be introduced by a declaration, unless it is a predeclared identifier. Declarations also specify certain permanent properties of an object, such as whether it is a constant, a type, or a variable. The identifier is then used to refer to the associated object.</div>
<div style="margin-left:45px"><span class="label"><a name="12111">3.4.2</a></span>
The scope of an object x extends textually from the point of its declaration to the end of the block (module, constructor, condition, or class) to which the declaration belongs and hence to which the object is local. It excludes the scopes of equally named objects which are declared in nested blocks. The scope rules are:</div>
<div style="margin-left:63px"><span class="label"><a name="12112">3.4.2.1</a></span>
No identifier may denote more than one object within a given scope (i.e. no identifier may be declared twice in a block)</div>
<div style="margin-left:63px"><span class="label"><a name="12113">3.4.2.2</a></span>
An object may only be referenced within its scope</div>
<div style="margin-left:63px"><span class="label"><a name="12114">3.4.2.3</a></span>
Identifiers denoting class fields are valid in class designators only</div>
<div style="margin-left:45px"><span class="label"><a name="12193">3.4.3</a></span>
If a module N constitutes module M using a <b>submod</b> declaration (see <a href="#12169">3.10 Modules</a>), the BUSY file in the file system directory of M becomes a nested module of N; this relation is recursive.</div>
<div style="margin-left:45px"><span class="label"><a name="12116">3.4.4</a></span>
An identifier declared in a module may be followed by an export mark (<b>*</b>, <b>-</b> or <b>!</b>) in its declaration to indicate that it is visible to either both outer and nested modules (<b>*</b> and <b>!</b>), or only to nested modules (<b>-</b>).</div>
<div style="margin-left:45px"><span class="label"><a name="12163">3.4.5</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12377">3.4.5.1</a></span>
<code>identdef ::= ident ['*'|'-'|'!']</code></div>
<div style="margin-left:63px"><span class="label"><a name="12244">3.4.5.2</a></span>
<code>declaration ::= vardecl | typedecl</code></div>
<div style="margin-left:63px"><span class="label"><a name="12378">3.4.5.3</a></span>
<code>designator ::= ['^'|'.'] ident { '.' ident }</code></div>
<div style="margin-left:45px"><span class="label"><a name="12117">3.4.6</a></span>
A nested module M can access a visible identifier x declared in an outer module N by <b>^</b>x, if it was declared before the <b>submod</b> M declaration in N (<b>^</b> is the outer module operator). A module N can access an identifier y declared in a nested module by M<b>.</b>x, but only after the <b>submod</b> M declaration</div>
<div style="margin-left:45px"><span class="label"><a name="12115">3.4.7</a></span><span class="ident">NOTE</span>
This implies that a nested module cannot reference objects declared after the <b>submod</b> declaration in the outer modules which (directly or indirectly) references the nested module.</div>
<div style="margin-left:45px"><span class="label"><a name="12118">3.4.8</a></span>
The identifiers in section <a href="#11631">4 Predeclared Class Reference</a>, <a href="#11697">5 Predeclared  Field Reference</a>, <a href="#11934">6 Predeclared Enumeration Reference</a>, <a href="#11920">7 Predeclared  Variable Reference</a>, and <a href="#11996">8 Predeclared  Procedure Reference</a> are predeclared; their meaning is defined in the indicated sections.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12048">3.5</a></span>
<b>Type declarations</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12049">3.5.1</a></span>
A data type determines the set of values which variables of that type may assume, and the operators that are applicable. A type declaration associates an identifier with a type. In the case of class types it also defines the structure of variables of this type. </div>
<div style="margin-left:45px"><span class="label"><a name="12245">3.5.2</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12246">3.5.2.1</a></span>
<code>typedecl ::= type identdef '=' ( enumdecl | classdecl )</code></div>
<h4 style="margin-left:45px"><span class="label"><a name="12120">3.5.3</a></span>
Basic types</h4>
<div style="margin-left:63px"><span class="label"><a name="12123">3.5.3.1</a></span>
The basic types are denoted by predeclared identifiers. The associated operators are defined in <a href="#12204">3.7.3 Operators</a>. The values of the given basic types are the following:</div>
<div style="margin-left:81px"><span class="label"><a name="12124">3.5.3.1.1</a></span>
<b>bool</b> (see <a href="#12081">3.3.4 Booleans</a>); the default value is false</div>
<div style="margin-left:81px"><span class="label"><a name="12125">3.5.3.1.2</a></span>
<b>int</b> (see <a href="#12071">3.3.5 Numbers</a>); the default value is 0; an implementation shall at least support 52 bit resolution</div>
<div style="margin-left:81px"><span class="label"><a name="12126">3.5.3.1.3</a></span>
<b>real</b> (see <a href="#12071">3.3.5 Numbers</a>); the default value is 0.0; an implementation shall at least support IEEE 754 64 bit resolution </div>
<div style="margin-left:81px"><span class="label"><a name="12127">3.5.3.1.4</a></span>
<b>string</b> (see <a href="#12074">3.3.6 Strings</a>); the default value is the empty string</div>
<div style="margin-left:81px"><span class="label"><a name="12128">3.5.3.1.5</a></span>
<b>path</b> (see <a href="#12080">3.3.8 Paths</a>); the default value is <b>'.'</b></div>
<div style="margin-left:81px"><span class="label"><a name="12129">3.5.3.1.6</a></span>
<b>symbol</b> (see <a href="#12078">3.3.7 Symbols</a>); the default value is an empty string</div>
<h4 style="margin-left:45px"><span class="label"><a name="12130">3.5.4</a></span>
Class types</h4>
<div style="margin-left:63px"><span class="label"><a name="12131">3.5.4.1</a></span>
A class type is a structure consisting of a fixed number of elements, called fields, with possibly different types. The class type declaration specifies the name and type of each field. The scope of the field identifiers extends from the point of their declaration to the end of the class type, but they are also visible within designators referring to elements of class variables (see <a href="#12196">3.7.2 Operands</a>). If a variable of class type is visible, also all field identifiers are visible. </div>
<div style="margin-left:63px"><span class="label"><a name="12132">3.5.4.2</a></span>
Class types are extensible, i.e. a class type can be declared as an extension of another class type. In the example</div>
<div style="margin-left:81px"><span class="label"><a name="12136">3.5.4.2.1</a></span>
<code>type T0 = class { x: int } <br />type T1 = class (T0) { y: real }</code></div>
<div style="margin-left:63px"><span class="label"><a name="12134">3.5.4.3</a></span>
T1 is a (direct) <i>extension</i> of T0 and T0 is the (direct) base type of T1. An extended type T1 consists of the fields of its base type and of the fields which are declared in T1. In general all identifiers declared in the extended class must be different from the identifiers declared in its base type classes.</div>
<div style="margin-left:63px"><span class="label"><a name="12159">3.5.4.4</a></span>
Syntax:</div>
<div style="margin-left:81px"><span class="label"><a name="12160">3.5.4.4.1</a></span>
<code>classdecl ::= class [ '(' designator ')' ] '{' { fielddecl [';'] } '}'</code></div>
<div style="margin-left:81px"><span class="label"><a name="12161">3.5.4.4.2</a></span>
<code>fielddecl ::= ident ':' typeref</code></div>
<div style="margin-left:63px"><span class="label"><a name="12149">3.5.4.5</a></span>
Classes are reference types, i.e. an assignment of variables of class type creates a copy of the reference, not a copy of the referenced object.</div>
<div style="margin-left:63px"><span class="label"><a name="12172">3.5.4.6</a></span>
Fields can be of basic, enumeration or list types.</div>
<div style="margin-left:63px"><span class="label"><a name="12174">3.5.4.7</a></span><span class="ident">NOTE</span>
Fields cannot be of class type, but they can be of a list type the element type of which is a class type.</div>
<div style="margin-left:63px"><span class="label"><a name="12370">3.5.4.8</a></span>
This specification includes a set of predeclared classes with a defined meaning for the build process (see <a href="#11631">4 Predeclared Class Reference</a>).</div>
<h4 style="margin-left:45px"><span class="label"><a name="12137">3.5.5</a></span>
<b>Enumeration types</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12138">3.5.5.1</a></span>
An enumeration is a sequence of symbols that denote the values which constitute the data type. They, and no other values, belong to this type. The default value of an enumeration type is the first symbol of the sequence.</div>
<div style="margin-left:63px"><span class="label"><a name="12142">3.5.5.2</a></span>
Syntax:</div>
<div style="margin-left:81px"><span class="label"><a name="12144">3.5.5.2.1</a></span>
<code>enumeration = '(' symbol { [','] symbol } ')'</code></div>
<div style="margin-left:63px"><span class="label"><a name="12145">3.5.5.3</a></span>
Example:</div>
<div style="margin-left:81px"><span class="label"><a name="12366">3.5.5.3.1</a></span>
<code>type color = ( `red, `green, `blue )</code></div>
<div style="margin-left:63px"><span class="label"><a name="12371">3.5.5.4</a></span>
There are predeclared enumeration types (see <a href="#11934">6 Predeclared Enumeration Reference</a>).</div>
<h4 style="margin-left:45px"><span class="label"><a name="12139">3.5.6</a></span>
List types</h4>
<div style="margin-left:63px"><span class="label"><a name="12148">3.5.6.1</a></span>
A list is a dynamic structure consisting of a variable number of elements which are all of the same type, called the element type. </div>
<div style="margin-left:63px"><span class="label"><a name="12140">3.5.6.2</a></span>
List types are not declared using the <b>type</b> keyword. Instead each variable or field of basic, class or enumeration type becomes a list by appending <b>[]</b> to its type.</div>
<div style="margin-left:63px"><span class="label"><a name="12175">3.5.6.3</a></span>
The elements of a list cannot be of list type.</div>
<div style="margin-left:63px"><span class="label"><a name="12183">3.5.6.4</a></span>
Lists are created by list literals. If the list literal appears on the right side of an assignment or initializer, the list type is given by the left side; otherwise or when the left side has no explicit type, then the type of the list is determined by the first element expression of the list literal. The type of an empty list literal is undefined. </div>
<div style="margin-left:63px"><span class="label"><a name="12180">3.5.6.5</a></span>
The default value of a field of list type is the empty list.</div>
<div style="margin-left:63px"><span class="label"><a name="12150">3.5.6.6</a></span>
Lists are reference types, i.e. an assignment of variables of list type creates a copy of the reference, not a copy of the referenced list.</div>
<div style="margin-left:63px"><span class="label"><a name="12157">3.5.6.7</a></span>
Syntax:</div>
<div style="margin-left:81px"><span class="label"><a name="12182">3.5.6.7.1</a></span>
<code>list_type ::= designator '[]'</code></div>
<div style="margin-left:81px"><span class="label"><a name="12158">3.5.6.7.2</a></span>
<code>list ::= '[' [ expression { ',' expression } [ ',' ] ] ']'</code></div>
<h4 style="margin-left:27px"><span class="label"><a name="12151">3.6</a></span>
Variable declarations</h4>
<div style="margin-left:45px"><span class="label"><a name="12152">3.6.1</a></span>
Variable declarations introduce variables by defining an identifier and an optional data type for them. Variables are immediately initialized, either by a default value or an object constructor.</div>
<div style="margin-left:45px"><span class="label"><a name="12153">3.6.2</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12154">3.6.2.1</a></span>
<code>vardecl ::= ( var | let | param ) identdef [ ':' explicitType ] initializer</code></div>
<div style="margin-left:63px"><span class="label"><a name="12155">3.6.2.2</a></span>
<code>initializer ::= constructor | defaultValue</code></div>
<div style="margin-left:63px"><span class="label"><a name="12166">3.6.2.3</a></span>
<code>constructor ::= '{' block '}'</code></div>
<div style="margin-left:63px"><span class="label"><a name="12186">3.6.2.4</a></span>
<code>defaultValue ::= '=' expression</code></div>
<div style="margin-left:63px"><span class="label"><a name="12156">3.6.2.5</a></span>
<code>explicitType ::= designator [ '[]' ]</code></div>
<div style="margin-left:63px"><span class="label"><a name="12185">3.6.2.6</a></span>
<code>designator ::= ['^'|'.'] ident {'.' ident }</code></div>
<div style="margin-left:45px"><span class="label"><a name="12165">3.6.3</a></span>
Variables declared with <b>var</b> are mutable. Variables declared with <b>let</b> are immutable. The immutability is transitive: when the variable is of class or list type, also the class fields or list elements are immutable.</div>
<div style="margin-left:45px"><span class="label"><a name="12170">3.6.4</a></span>
The explicit type reference is optional if an default vallue is assigned; if an explicit type reference is present, then the type of the default value must be assignment compatible with the explicit type (see <a href="#12240">3.8.3 Assignments</a>).</div>
<div style="margin-left:45px"><span class="label"><a name="12379">3.6.5</a></span>
Variables declared as <b>param</b> can only be of basic or enumeration type, and can only be set by a parameter list in the <b>submod</b> declaration of the outer module (see <a href="#12109">3.4 Declarations and scope rules</a> and <a href="#12169">3.10 Modules</a>), by assignment in the same module where the <b>param</b> declaration lives, or by means provided by the compiler implementation (e.g. command line parameters); in the latter case parameters located in submodules can only be set if the corresponding <b>submod</b> declaration is public.</div>
<div style="margin-left:45px"><span class="label"><a name="12171">3.6.6</a></span>
If an explicit type reference is present and of class type, then the initializer can be an object constructor. Before the object constructor runs, an instance of the explicit class type is created and initialized with default values by the runtime. The created instance is mutable within the constructor block even if the variable is declared with <b>let</b>. The created instance can be referenced by a designator with a '.' prefix (local instance operator). Here is an example:</div>
<div style="margin-left:63px"><span class="label"><a name="12190">3.6.6.1</a></span>
<code>type T1 = class (T0) { y: real }</code></div>
<div style="margin-left:63px"><span class="label"><a name="12191">3.6.6.2</a></span>
<code>let t : T1 { .y = 12.3 }</code></div>
<div style="margin-left:45px"><span class="label"><a name="12233">3.6.7</a></span><span class="ident">NOTE</span>
If in a constructor a designator is followed by a '.' prefix, a semicolon must be put in between, otherwise the '.' ident is added to the previous designator.</div>
<div style="margin-left:45px"><span class="label"><a name="12192">3.6.8</a></span>
Constructors can only appear on module level, not in constructor or condition scopes. Constructors and default value assignments are executed in the regular declaration and statement flow.</div>
<div style="margin-left:45px"><span class="label"><a name="12372">3.6.9</a></span>
There are predefined variables with global scope (see <a href="#11920">7 Predeclared  Variable Reference</a>).</div>
<h4 style="margin-left:27px"><span class="label"><a name="12167">3.7</a></span>
Expressions</h4>
<div style="margin-left:45px"><span class="label"><a name="12195">3.7.1</a></span>
Expressions are constructs denoting rules of computation whereby constants and current values of variables are combined to compute other values by the application of operators and function procedures. Expressions consist of operands and operators. Parentheses may be used to express specific associations of operators and operands.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12196">3.7.2</a></span>
Operands</h4>
<div style="margin-left:63px"><span class="label"><a name="12197">3.7.2.1</a></span>
With the exception of literal constants (numbers, strings, paths, symbols, or lists), operands are denoted by designators. A designator consists of an identifier referring to a variable, type, or predeclared procedure. This identifier may possibly be qualified by one or more module identifier, an outer module operator or local instance operator (see <a href="#12109">3.4 Declarations and scope rules</a>, <a href="#12151">3.6 Variable declarations</a> and <a href="#12169">3.10 Modules</a>), and may be followed by selectors if the designated object is a class field.</div>
<div style="margin-left:63px"><span class="label"><a name="12198">3.7.2.2</a></span>
Syntax:</div>
<div style="margin-left:81px"><span class="label"><a name="12199">3.7.2.2.1</a></span>
<code>designator ::= ['^'|'.'] ident { '.' ident }</code></div>
<div style="margin-left:81px"><span class="label"><a name="12200">3.7.2.2.2</a></span>
<code>ExpList ::= expression {[','] expression}</code></div>
<div style="margin-left:63px"><span class="label"><a name="12201">3.7.2.3</a></span>
If <i>r</i> designates a class, then <i>r.f</i> denotes the field <i>f</i> of <i>r</i>. </div>
<div style="margin-left:63px"><span class="label"><a name="12202">3.7.2.4</a></span>
If the designated object is a constant or a variable, then the designator refers to its current value. </div>
<div style="margin-left:63px"><span class="label"><a name="12203">3.7.2.5</a></span>
If the designated object is a predeclared procedure, the designator implies an activation of that procedure and stands for the value resulting from its execution; the actual parameters must correspond to the formal parameters.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12204">3.7.3</a></span>
Operators</h4>
<div style="margin-left:63px"><span class="label"><a name="12205">3.7.3.1</a></span>
Four classes of operators with different precedences (binding strengths) are syntactically distinguished in expressions. The operator <b>!</b> as well as the unary <b>+</b> and <b>-</b> operators have the highest precedence, followed by multiplication operators, addition operators, and relations. Operators of the same precedence associate from left to right. For example, <code>x - y - z</code> stands for <code>(x - y) - z</code>.</div>
<div style="margin-left:63px"><span class="label"><a name="12206">3.7.3.2</a></span>
Syntax:</div>
<div style="margin-left:81px"><span class="label"><a name="12208">3.7.3.2.1</a></span>
<code>expression ::= SimpleExpression [ relation SimpleExpression ]</code></div>
<div style="margin-left:81px"><span class="label"><a name="12211">3.7.3.2.2</a></span>
<code>relation ::= '==' | '!=' | '&lt;' | '&lt;=' | '&gt;' | '&gt;=' | in</code></div>
<div style="margin-left:81px"><span class="label"><a name="12210">3.7.3.2.3</a></span>
<code>SimpleExpression ::= term { AddOperator term }</code></div>
<div style="margin-left:81px"><span class="label"><a name="12212">3.7.3.2.4</a></span>
<code>AddOperator ::= '+' | '-' | '||'</code></div>
<div style="margin-left:81px"><span class="label"><a name="12213">3.7.3.2.5</a></span>
<code>term ::= factor {MulOperator factor}</code></div>
<div style="margin-left:81px"><span class="label"><a name="12214">3.7.3.2.6</a></span>
<code>MulOperator ::= '*' | '/' | '&amp;&amp;' | '%'</code></div>
<div style="margin-left:81px"><span class="label"><a name="12215">3.7.3.2.7</a></span>
<code>factor ::= integer | real | string | symbol | path | true | false</code>
<br><code>           | designator [ '(' [ ExpList ] ')' ]  </code>
<br><code>           | '(' expression [  '?' expression ':' expression ] ')'  </code>
<br><code>           | ('+' | '-' |'!') factor</code>
<br><code>           | list </code></div>
<div style="margin-left:81px"><span class="label"><a name="12216">3.7.3.2.8</a></span>
<code>list ::= '[' [ expression { [','] expression } [ ',' ] ] ']'</code></div>
<h4 style="margin-left:63px"><span class="label"><a name="12217">3.7.3.3</a></span>
Logical operators</h4>
<div style="margin-left:81px"><span class="label"><a name="12218">3.7.3.3.1</a></span>
<table border=1 cellspacing=0 CELLPADDING=3 >
<tr>
<td>
|| </td>
<td>
<br>logical disjunction </td>
<td>
<br><code>p || q</code> </td>
<td>
<br><i>if p then </i><i><b>true</b></i><i>, else q</i> </td></tr>
<tr>
<td>
<br>&amp;&amp; </td>
<td>
<br>logical conjunction </td>
<td>
<br><code>p &amp;&amp; q</code> </td>
<td>
<br><i>if p then q, else </i><i><b>false</b></i> </td></tr>
<tr>
<td>
<br>! </td>
<td>
<br>negation </td>
<td>
<br><code>!p</code> </td>
<td>
<br><i>not p</i></td></tr></table></div>
<div style="margin-left:81px"><span class="label"><a name="12219">3.7.3.3.2</a></span>
These operators apply to <b>bool</b> operands and yield a <b>bool</b> result.</div>
<h4 style="margin-left:63px"><span class="label"><a name="12220">3.7.3.4</a></span>
Arithmetic operators</h4>
<div style="margin-left:81px"><span class="label"><a name="12221">3.7.3.4.1</a></span>
<table border=1 cellspacing=0 CELLPADDING=3 >
<tr>
<td>
+ </td>
<td>
<br>sum </td></tr>
<tr>
<td>
<br>- </td>
<td>
<br>difference </td></tr>
<tr>
<td>
<br>* </td>
<td>
<br>product </td></tr>
<tr>
<td>
<br>/ </td>
<td>
<br>quotient </td></tr>
<tr>
<td>
<br>% </td>
<td>
<br>modulus </td></tr></table></div>
<div style="margin-left:81px"><span class="label"><a name="12222">3.7.3.4.2</a></span>
The operators <b>+</b>, <b>-</b>, <b>*</b>, and <b>/</b> apply to operands of numeric types (<b>int</b> and <b>real</b>). Both operands must be of the same type. To convert from <b>real</b> to <b>int</b> or back use the predeclared toint() or toreal() functions (see <a href="#11996">8 Predeclared  Procedure Reference</a>). The type of the result is the type of the operands. When used as monadic operators, <b>-</b> denotes sign inversion and <b>+</b> denotes the identity operation. </div>
<div style="margin-left:81px"><span class="label"><a name="12228">3.7.3.4.3</a></span>
The operators <b>+</b>, <b>-</b> and <b>*</b> also apply to list types and mixed list and element types. Each operator creates a new list and doesn't affect the operands. The operands must be of the same type (if both are lists) or the element types must be assignment compatible (see <a href="#12240">3.8.3 Assignments</a>). The result of the <b>+</b> operator is a list consisting of the right operand appended to the left operand (at least one of the operands must be a list type). The result of the <b>*</b> operator is a list with the right operand (a list element) appended to the left operand (a list), but only if not contained in the left operand, or a list which corresponds to the intersection of the operands (both lists). The result of the <b>-</b> operator is a list which corresponds to the left operand (a list) with the right operand (a list or a list element) removed.</div>
<div style="margin-left:81px"><span class="label"><a name="12229">3.7.3.4.4</a></span>
The operator <b>+</b> also applies to string and path types. Both operands must be of the same type. The type of the result is the type of the operands. If the operands are strings, the result corresponds to the concatenation of the left and right operand. If the operands are paths, then the result corresponds to the concatenated, normalized path; the right operand must be a relative path; the ../ are resolved with the operation; if the left operand doesn't have enough segments to accommodate the right operand, the execution halts with an error.</div>
<h4 style="margin-left:63px"><span class="label"><a name="12224">3.7.3.5</a></span>
Relations</h4>
<div style="margin-left:81px"><span class="label"><a name="12225">3.7.3.5.1</a></span>
<table border=1 cellspacing=0 CELLPADDING=3 >
<tr>
<td>
== </td>
<td>
<br>equal </td></tr>
<tr>
<td>
<br>!= </td>
<td>
<br>unequal </td></tr>
<tr>
<td>
<br>&lt; </td>
<td>
<br>less </td></tr>
<tr>
<td>
<br>&lt;= </td>
<td>
<br>less or equal </td></tr>
<tr>
<td>
<br>&gt; </td>
<td>
<br>greater </td></tr>
<tr>
<td>
<br>&gt;= </td>
<td>
<br>greater or equal </td></tr>
<tr>
<td>
<br><b>in</b> </td>
<td>
<br>set membership </td></tr></table></div>
<div style="margin-left:81px"><span class="label"><a name="12226">3.7.3.5.2</a></span>
Relations yield a <b>bool</b> result. The relations <b>==</b>, <b>!=</b>, <b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, and <b>&gt;=</b> apply to the numeric types, as well as strings. The relations == and != also apply to <b>bool</b>, enumerations, symbols, path, class and list types. Both operands must be of the same type.</div>
<div style="margin-left:81px"><span class="label"><a name="12227">3.7.3.5.3</a></span>
x <b>in</b> s stands for "s contains x"; s must be of list type and x must be compatible to the element type of s.</div>
<div style="margin-left:81px"><span class="label"><a name="12232">3.7.3.5.4</a></span><span class="ident">NOTE</span>
The expression <code>A == B || C == D</code> corresponds to <code>(A == (B || C)) == D)</code>, not to <code>(A==B) || (C==D)</code></div>
<h4 style="margin-left:63px"><span class="label"><a name="12380">3.7.3.6</a></span>
Conditional expression</h4>
<div style="margin-left:81px"><span class="label"><a name="12381">3.7.3.6.1</a></span>
The value of an expression can depend on a condition. </div>
<div style="margin-left:81px"><span class="label"><a name="12382">3.7.3.6.2</a></span>
Example:</div>
<div style="margin-left:99px"><span class="label"><a name="12385">3.7.3.6.2.1</a></span>
<code>let x = ( cond ? 22 : 33 )</code></div>
<div style="margin-left:81px"><span class="label"><a name="12384">3.7.3.6.3</a></span>
If in the example <code>cond</code> is <b>true</b>, then <b><code>x</code></b> becomes 22, otherwise 33.</div>
<h4 style="margin-left:63px"><span class="label"><a name="12230">3.7.3.7</a></span>
Function Call</h4>
<div style="margin-left:81px"><span class="label"><a name="12231">3.7.3.7.1</a></span>
A function call is a factor in an expression. Each expression in the actual parameters list (if any) is used to initialize a corresponding formal parameter. The number of expressions in the actual parameter list must correspond the number of formal parameters of the corresponding predeclared procedure (see <a href="#11996">8 Predeclared  Procedure Reference</a>).</div>
<h4 style="margin-left:27px"><span class="label"><a name="12168">3.8</a></span>
Statements</h4>
<div style="margin-left:45px"><span class="label"><a name="12234">3.8.1</a></span>
Statements denote actions. There are elementary and structured statements. Elementary statements are not composed of any parts that are themselves statements. They are the assignment and the procedure call. Structured statements are composed of parts that are themselves statements. The condition is a structured statement. The initializer of a variable declaration is statement-like and also executed in the regular statement flow.</div>
<div style="margin-left:45px"><span class="label"><a name="12235">3.8.2</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12236">3.8.2.1</a></span>
<code>statement ::= condition | assignment | call | macrouse</code></div>
<div style="margin-left:63px"><span class="label"><a name="12237">3.8.2.2</a></span>
<code>assignment ::= designator ( '=' | '+=' | '-=' | '*=' ) expression</code></div>
<div style="margin-left:63px"><span class="label"><a name="12238">3.8.2.3</a></span>
<code>call ::= ident '(' ExpList ')'</code></div>
<div style="margin-left:63px"><span class="label"><a name="12239">3.8.2.4</a></span>
<code>condition ::= if expression '{' block '}' [ else ( condition | '{' block '}' ) ] </code></div>
<div style="margin-left:63px"><span class="label"><a name="12243">3.8.2.5</a></span>
<code>block ::= { ( declaration | statement ) [';'] }</code></div>
<h4 style="margin-left:45px"><span class="label"><a name="12240">3.8.3</a></span>
Assignments</h4>
<div style="margin-left:63px"><span class="label"><a name="12349">3.8.3.1</a></span>
Assignments replace the current value of a variable or field by a new value specified by an expression. The expression type must be assignment compatible with the variable or field. Variables declared with <b>let</b> cannot be assigned to, nor can they be assigned to other variables not declared with <b>let</b>.</div>
<div style="margin-left:63px"><span class="label"><a name="12386">3.8.3.2</a></span>
Types A and B are assignment compatible, if</div>
<div style="margin-left:81px"><span class="label"><a name="12387">3.8.3.2.1</a></span>
A and B are the same type,</div>
<div style="margin-left:81px"><span class="label"><a name="12388">3.8.3.2.2</a></span>
A is the same or a base class of B,</div>
<div style="margin-left:81px"><span class="label"><a name="12389">3.8.3.2.3</a></span>
A is an enumeration type and B is a symbol which belongs to A.</div>
<div style="margin-left:63px"><span class="label"><a name="12362">3.8.3.3</a></span>
There are four assignment variants: plain replacement (<b>=</b>), in-place add (<b>+=</b>), in-place subtract (<b>-=</b>) and in-place multiply (<b>*=</b>). </div>
<div style="margin-left:63px"><span class="label"><a name="12367">3.8.3.4</a></span>
All four variants are available for numeric types. The in-place variants are an abbreviation of their corresponding arithmetic operators; e.g. <code>a += 10</code>  is an abbreviation of <code>a = a + 10</code> (see <a href="#12220">3.7.3.4 Arithmetic operators</a>).</div>
<div style="margin-left:63px"><span class="label"><a name="12368">3.8.3.5</a></span>
All four variants are available for list type variables or fields. The plain assignment replaces the the designated variable or field by the list resulting from the expression. In contrast the in-place arithmetic operations modify the list referenced by the designated variable or field. The <b>+=</b> operator appends a copy of the value of the expression (a list or element) to the list. The <b>*=</b> operator appends the value of the expression to the list, if it is a single element and not yet contained in the list. The <b>*=</b> operator replaces the contents of the list by the intersection, if the value of the expression is a list. The <b>-=</b> operator removes the given element(s) from the list, if the value of the expression is either a single element or a list.</div>
<div style="margin-left:63px"><span class="label"><a name="12369">3.8.3.6</a></span>
The plain replacement (<b>=</b>) and in-place add (<b>+=</b>) operators also apply to string and path types. The designated variable or field  must be of the same type as the expression. The plain assignment replaces the the designated variable or field value by the string or path resulting from the expression. In case of strings, the <b>+=</b> operator concatenates the right side to the left side. In case of paths, the left side is replaced by a concatenated, normalized version of the left and right side; the right side must be a relative path; the ../ are resolved with the operation; if the left side doesn't have enough segments to accommodate the right side, the execution halts with an error.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12350">3.8.4</a></span>
Conditions</h4>
<div style="margin-left:63px"><span class="label"><a name="12351">3.8.4.1</a></span>
If statements specify the conditional execution of guarded statement sequences. The boolean expression preceding a statement sequence is called its guard. The guards are evaluated in sequence of occurrence, until one evaluates to <b>true</b>, whereafter its associated statement sequence is executed. If no guard is satisfied, the statement sequence following the symbol <b>else</b> is executed, if there is one.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12352">3.8.5</a></span>
Calls</h4>
<div style="margin-left:63px"><span class="label"><a name="12353">3.8.5.1</a></span>
A procedure call activates a predeclared procedure. It has a (possibly empty) a list of actual parameters. The correspondence is established by the positions. </div>
<div style="margin-left:63px"><span class="label"><a name="12357">3.8.5.2</a></span>
Each actual parameter must be an expression. This expression is evaluated before the procedure activation, and the resulting value is assigned to the formal parameter. The evaluation order is from left to right.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12570">3.9</a></span>
Macros</h4>
<div style="margin-left:45px"><span class="label"><a name="12576">3.9.1</a></span>
Macros are suitable for combining a sequence of declarations and statements into a single command. Macros work at the level of lexical tokens. The tokens that make up the macro definition are inserted into the place where the macro is used, either one-to-one, or modified in accordance with the arguments, if any. </div>
<div style="margin-left:45px"><span class="label"><a name="12571">3.9.2</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12572">3.9.2.1</a></span>
<code>macrodef ::= </code><b><code>define</code></b><code> identdef [ '(' [ ident { [','] ident } ] ')' ] body</code></div>
<div style="margin-left:63px"><span class="label"><a name="12573">3.9.2.2</a></span>
<code>body ::= '{' { ( subdirectory | declaration | statement ) [';'] } '}'</code></div>
<div style="margin-left:63px"><span class="label"><a name="12578">3.9.2.3</a></span>
<code>macrouse ::= designator '(' ExpList ')'</code></div>
<div style="margin-left:45px"><span class="label"><a name="12580">3.9.3</a></span>
A macro definition associates an identifier with a sequence of tokens and optional arguments. Macros can only be defined on module level. Macro definitions belong to the regular name space of a module and can be dereferenced using a designator; the regular rules apply (see <a href="#12109">3.4 Declarations and scope rules</a>).</div>
<div style="margin-left:45px"><span class="label"><a name="12577">3.9.4</a></span>
A macro use syntactically looks like a procedure call. Arguments - if any - are not evaluated at the call site like they are for procedure calls; instead the tokens passed as arguments are inserted in the macro body wherever the arument is referenced; only the resulting token stream is passed to the parser and validated. In contrast to procedure calls, the commas in the argument list are mandatory for macro uses. In the macro body it is possible to concatenate identifiers using the '&amp;' operator.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12169">3.10</a></span>
Modules</h4>
<div style="margin-left:45px"><span class="label"><a name="12194">3.10.1</a></span>
A module is a collection of declarations of types and variables, together with a sequence of statements for the purpose of assigning values to the variables. </div>
<div style="margin-left:45px"><span class="label"><a name="12375">3.10.2</a></span>
A module is associated with a directory in the file system, and specifically with a file in that directory called "BUSY"; each such file is either empty or includes source code as specified herein.</div>
<div style="margin-left:45px"><span class="label"><a name="12358">3.10.3</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12359">3.10.3.1</a></span>
<code>Module ::= { ( submodule | declaration | statement | macrodef ) [';'] }</code></div>
<div style="margin-left:63px"><span class="label"><a name="12586">3.10.3.2</a></span>
<code>submodule ::= submod  identdef [ '=' ( path | ident ) ] [ else path ] [ '(' paramList ')' ]</code></div>
<div style="margin-left:63px"><span class="label"><a name="12587">3.10.3.3</a></span>
<code>paramList ::= paramValue { [','] paramValue }</code></div>
<div style="margin-left:63px"><span class="label"><a name="12588">3.10.3.4</a></span>
<code>paramValue ::= ident [ ( '=' | ':=' ) expression ]</code></div>
<div style="margin-left:45px"><span class="label"><a name="12374">3.10.4</a></span>
Modules are in a hierarchical relationship to each other. This relationship is explicit. Each module - starting from the module which represents the root directory of the source tree - declares which other modules belong to the build using the <b>submod</b> declaration. A <b>submod</b> declaration references the file system directory the module is associated with, and makes the submodule accessible to the current module by the given identifier. </div>
<div style="margin-left:45px"><span class="label"><a name="12551">3.10.5</a></span>
In the simple case, the identifier directly corresponds to the name of a subdirectory of the directory associated with the current module.</div>
<div style="margin-left:45px"><span class="label"><a name="12552">3.10.6</a></span>
In the general case, the path given in the <b>submod</b> declaration can point to any file system directory, as long as it doesn't point to a file system directory already associated with the current or any of its outer modules (see <a href="#12080">3.3.8 Paths</a> and <a href="#12109">3.4 Declarations and scope rules</a>). </div>
<div style="margin-left:45px"><span class="label"><a name="12556">3.10.7</a></span><span class="ident">NOTE</span>
In other words: the module hierarchy is a logical hierarchy which can, but doesn't have to be congruent with the file system  hierarchy.</div>
<div style="margin-left:45px"><span class="label"><a name="12554">3.10.8</a></span>
Each <b>submod</b> declaration constitutes a separate instance of a module, even if two or more modules in the module hierarchy are associated with the same file system directory.</div>
<div style="margin-left:45px"><span class="label"><a name="12376">3.10.9</a></span>
Modules are parsed and executed depth-first; when the parser meets a <b>submod</b> declaration, it parses the submodule before it continues with the current module.</div>
<div style="margin-left:45px"><span class="label"><a name="12589">3.10.10</a></span>
A <b>submod</b> declaration may have a list of parameter names and optional value expressions. The value expressions are evaluated from left to right. The name identifier must correspond to a name of a <b>param</b> declaration in the submodule (see <a href="#12151">3.6 Variable declarations</a>). If the value expression is missing, <b>true</b> is assumed as value. Parameter values set by means provided by the compiler override the parameter values set via <b>submod</b> declaration.</div>
<div style="margin-left:45px"><span class="label"><a name="12707">3.10.11</a></span>
A <b>submod</b> declaration may have an optional <b>else</b> keyword followed by an alternative module file path. The file referenced by this path is parsed instead of the BUSY file in case the latter doesn't exist. An alternative module file itself must not include <b>submod</b> declarations.</div>
<div style="margin-left:45px"><span class="label"><a name="12708">3.10.12</a></span><span class="ident">NOTE</span>
The alternative module file path is useful if e.g. in a big source tree it should be possible to delete the modules not required by a given project; the alternative module file just makes a minimal set of declarations mimicking the original public module declarations, but issuing an error, if the build tries to use the module anyway.</div>
<div style="margin-left:45px"><span class="label"><a name="12569">3.10.13</a></span>
Implementations are expected to also support the <b>submodule</b> keyword as a synonym of <b>submod</b>.</div>
<div style="margin-left:45px"><span class="label"><a name="12568">3.10.14</a></span><span class="ident">NOTE</span>
In an earlier version of this specification the keyword <b>subdir</b> was used instead of <b>submod</b>. Implementations might want to continue <b>subdir</b> as a synonym and true functional subset of <b>submod</b>.  </div>
<h4 style="margin-left:27px"><span class="label"><a name="12241">3.11</a></span>
Alternative Syntax</h4>
<div style="margin-left:45px"><span class="label"><a name="12251">3.11.1</a></span>
The syntax version so far has a C flair. For people preferring a Pascal flair syntax, BUSY makes the following alternatives available.</div>
<div style="margin-left:45px"><span class="label"><a name="12252">3.11.2</a></span>
Syntax:</div>
<div style="margin-left:63px"><span class="label"><a name="12247">3.11.2.1</a></span>
<code>condition ::= if expression then block { elsif expression then block } [ else block ] end</code></div>
<div style="margin-left:63px"><span class="label"><a name="12242">3.11.2.2</a></span>
<code>initializer ::= constructor | ':=' expression</code></div>
<div style="margin-left:63px"><span class="label"><a name="12249">3.11.2.3</a></span>
<code>constructor ::= begin block end</code></div>
<div style="margin-left:63px"><span class="label"><a name="12250">3.11.2.4</a></span>
<code>assignment ::= designator ':=' expression</code></div>
<div style="margin-left:63px"><span class="label"><a name="12361">3.11.2.5</a></span>
<code>submodule ::= submod identdef [ ':=' ( path | ident ) ]</code></div>
<h4 style="margin-left:9px"><span class="label"><a name="11631">4</a></span>
<b>Predeclared Class Reference</b></h4>
<h4 style="margin-left:27px"><span class="label"><a name="11686">4.1</a></span>
Config</h4>
<div style="margin-left:45px"><span class="label"><a name="11695">4.1.1</a></span>
<b>Flags</b>: <a href="#11698">cflags</a>, <a href="#11703">cflags_c</a>, <a href="#11705">cflags_cc</a>, <a href="#11707">cflags_objc</a>, <a href="#11709">cflags_objcc</a>, <a href="#11741">defines</a>, <a href="#11757">include_dirs</a>, <a href="#11772">ldflags</a>, <a href="#11776">lib_dirs</a>, <a href="#11799">lib_names</a>, <a href="#11782">lib_files</a>, <a href="#11825">frameworks</a></div>
<div style="margin-left:45px"><span class="label"><a name="11696">4.1.2</a></span>
<b>Nested configs</b>: <a href="#11812">configs</a></div>
<div style="margin-left:45px"><span class="label"><a name="11687">4.1.3</a></span>
Configuration objects can be applied to products and specify sets of compiler flags, includes, defines, etc. They provide a way to conveniently group sets of this configuration information.</div>
<div style="margin-left:45px"><span class="label"><a name="11688">4.1.4</a></span>
The values in a config are additive only. If you want to remove a flag you need to remove the corresponding config that sets it. The final set of flags, defines, etc. for a target is generated in this order:</div>
<div style="margin-left:63px"><span class="label"><a name="11689">4.1.4.1</a></span>
The values specified directly on the Product (rather than using a Config)</div>
<div style="margin-left:63px"><span class="label"><a name="11690">4.1.4.2</a></span>
The configs specified in the ConfigurableProduct's <a href="#11812">configs</a> list, in order.</div>
<div style="margin-left:45px"><span class="label"><a name="11693">4.1.5</a></span>
Configs solve a problem where the build system needs to have a higher-level understanding of various compiler settings. For example, some compiler flags have to appear in a certain order relative to each other, some settings like defines and flags logically go together, and the build system needs to de-duplicate flags even though raw command-line parameters can't always be operated on in that way.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11676">4.2</a></span>
<b>Product</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11948">4.2.1</a></span>
A Product is also called a "build target". Products are inputs and outputs of build stages. </div>
<div style="margin-left:45px"><span class="label"><a name="11636">4.2.2</a></span>
<b>Deps</b>: <a href="#11831">deps</a></div>
<h4 style="margin-left:45px"><span class="label"><a name="11677">4.2.3</a></span>
<b>ConfigurableProduct</b></h4>
<h4 style="margin-left:63px"><span class="label"><a name="11661">4.2.3.1</a></span>
<b>CompiledProduct</b></h4>
<div style="margin-left:81px"><span class="label"><a name="11635">4.2.3.1.1</a></span>
<b>Flags</b>: <a href="#11698">cflags</a>, <a href="#11703">cflags_c</a>, <a href="#11705">cflags_cc</a>, <a href="#11707">cflags_objc</a>, <a href="#11709">cflags_objcc</a>, <a href="#11741">defines</a>, <a href="#11757">include_dirs</a>, <a href="#11772">ldflags</a>, <a href="#11776">lib_dirs</a>, <a href="#11799">lib_names</a>, <a href="#11782">lib_files</a>, <a href="#11825">frameworks</a></div>
<div style="margin-left:81px"><span class="label"><a name="11638">4.2.3.1.2</a></span>
<b>General</b>: <a href="#11812">configs</a>, <a href="#11885">sources</a></div>
<div style="margin-left:81px"><span class="label"><a name="11634">4.2.3.1.3</a></span>
The tools and commands used to create this product type will be determined by the source files in its <a href="#11885">sources</a>. Products containing multiple compiler-incompatible languages are not allowed (e.g. a target containing both C and C++ sources is acceptable, but a target containing C and Rust sources is not).</div>
<h4 style="margin-left:81px"><span class="label"><a name="11633">4.2.3.1.4</a></span>
<b>Executable</b></h4>
<div style="margin-left:99px"><span class="label"><a name="11981">4.2.3.1.4.1</a></span>
<b>General: </b><a href="#11978">name</a></div>
<div style="margin-left:99px"><span class="label"><a name="11957">4.2.3.1.4.2</a></span>
Make a binary which can be directly run by the OS.</div>
<div style="margin-left:99px"><span class="label"><a name="11958">4.2.3.1.4.3</a></span>
This is only the core binary, i.e. not a bundle as common on Mac.</div>
<h4 style="margin-left:81px"><span class="label"><a name="11662">4.2.3.1.5</a></span>
<b>Library</b></h4>
<div style="margin-left:99px"><span class="label"><a name="11670">4.2.3.1.5.1</a></span>
<b>General</b>: <a href="#11962">lib_type</a>, <a href="#11975">def_file</a>, <a href="#11978">name</a></div>
<div style="margin-left:99px"><span class="label"><a name="11645">4.2.3.1.5.2</a></span>
Make a ".a" / ".lib" / ".so" / ".dll" / ".dylib" file.</div>
<div style="margin-left:99px"><span class="label"><a name="11640">4.2.3.1.5.3</a></span>
If you only need the static library for intermediate results in the build, you should consider a SourceSet instead since it will skip the (potentially slow) step of creating the intermediate library file.</div>
<div style="margin-left:99px"><span class="label"><a name="11659">4.2.3.1.5.4</a></span>
A shared library will be specified on the linker line for targets listing the shared library in its <a href="#11831">deps</a>. If you don't want this (say you dynamically load the library at runtime), then you should depend on the shared library via <a href="xoid://11850@003526b9-5a79-4133-afbf-9bcd57214e0c">&lt;null reference&gt;</a>.</div>
<h4 style="margin-left:81px"><span class="label"><a name="11647">4.2.3.1.6</a></span>
<b>SourceSet</b></h4>
<div style="margin-left:99px"><span class="label"><a name="11648">4.2.3.1.6.1</a></span>
The language of a SourceSet target is determined by the extensions present in its sources.</div>
<div style="margin-left:99px"><span class="label"><a name="11649">4.2.3.1.6.2</a></span>
A source set is a collection of sources that get compiled, but are not linked to produce any kind of library. Instead, the resulting object files are implicitly added to the linker line of all targets that depend on the source set.</div>
<div style="margin-left:99px"><span class="label"><a name="11650">4.2.3.1.6.3</a></span>
In most cases, a source set will behave like a static library, except no actual library file will be produced. This will make the build go a little faster by skipping creation of a large static library, while maintaining the organizational benefits of focused build targets.</div>
<div style="margin-left:99px"><span class="label"><a name="11651">4.2.3.1.6.4</a></span>
The main difference between a source set and a static library is around handling of exported symbols. Most linkers assume declaring a function exported means exported from the static library. The linker can then do dead code elimination to delete code not reachable from exported functions.</div>
<div style="margin-left:99px"><span class="label"><a name="11652">4.2.3.1.6.5</a></span>
A source set will not do this code elimination since there is no link step. This allows you to link many source sets into a shared library and have the "exported symbol" notation indicate "export from the final shared library and not from the intermediate targets." There is no way to express this concept when linking multiple static libraries into a shared library.</div>
<h4 style="margin-left:45px"><span class="label"><a name="11671">4.2.4</a></span>
<b>Group</b></h4>
<div style="margin-left:63px"><span class="label"><a name="11672">4.2.4.1</a></span>
This target type allows you to create meta-targets that just collect a set of dependencies into one named target. </div>
<h4 style="margin-left:45px"><span class="label"><a name="11678">4.2.5</a></span>
<b>Action</b></h4>
<h4 style="margin-left:63px"><span class="label"><a name="11949">4.2.5.1</a></span>
Script</h4>
<div style="margin-left:81px"><span class="label"><a name="11682">4.2.5.1.1</a></span>
<b>Main</b>: <a href="#11917">args</a>, <a href="#11901">script</a>, <a href="#11907">outputs</a></div>
<h4 style="margin-left:81px"><span class="label"><a name="11679">4.2.5.1.2</a></span>
<b>LuaScript</b></h4>
<div style="margin-left:99px"><span class="label"><a name="11680">4.2.5.1.2.1</a></span>
This product type allows you to run a Lua script a single time to produce one or more output files. </div>
<div style="margin-left:99px"><span class="label"><a name="12823">4.2.5.1.2.2</a></span>
If the script produces source files which have to be compiled by a dependent Product (and only then) list these source files (and only those) in the <a href="#11907">outputs</a> list. This list might be redundant to what you specify in <a href="#11917">args</a>, but allows the build system to recognize and properly process the generated output of the script.</div>
<div style="margin-left:99px"><span class="label"><a name="12828">4.2.5.1.2.3</a></span>
<a href="#11917">args</a> makes use of <a href="#12603">Source Expansion</a>; the place-holders <a href="#12835">{{root_build_dir}}</a> and <a href="#12837">{{current_build_dir}}</a> are available.</div>
<h4 style="margin-left:81px"><span class="label"><a name="11681">4.2.5.1.3</a></span>
<b>LuaScriptForeach</b></h4>
<div style="margin-left:99px"><span class="label"><a name="11685">4.2.5.1.3.1</a></span>
<b>Main</b>: <a href="#11885">sources</a></div>
<div style="margin-left:99px"><span class="label"><a name="11684">4.2.5.1.3.2</a></span>
This product type allows you to run a script once-per-file over a set of sources. If you want to run a script once that takes many files as input, see <a href="#11679">LuaScript</a>.</div>
<div style="margin-left:99px"><span class="label"><a name="12617">4.2.5.1.3.3</a></span>
The <a href="#11917">args</a> field supports <a href="#12603">Source Expansion</a>. To perform source expansion in the <a href="#11917">args</a> field, BUSY substitutes placeholders and produces a different set of arguments for each invocation of the script.</div>
<h4 style="margin-left:63px"><span class="label"><a name="12590">4.2.5.2</a></span>
Message</h4>
<div style="margin-left:81px"><span class="label"><a name="12591">4.2.5.2.1</a></span>
<b>Main</b>: <a href="#12597">text</a>, <a href="#12593">msg_type</a></div>
<div style="margin-left:81px"><span class="label"><a name="12601">4.2.5.2.2</a></span>
The instance displays a message to the console. In case of MessageType `error the build halts.</div>
<h4 style="margin-left:63px"><span class="label"><a name="12625">4.2.5.3</a></span>
Moc</h4>
<div style="margin-left:81px"><span class="label"><a name="12626">4.2.5.3.1</a></span>
<b>Main</b>: <a href="#11885">sources</a>, <a href="#11741">defines</a>, <a href="#12819">tool_dir</a></div>
<div style="margin-left:81px"><span class="label"><a name="12634">4.2.5.3.2</a></span>
Calls the Qt <b>moc</b> executable from <a href="#12819">tool_dir</a> or - if <a href="#12819">tool_dir</a> is '.' - from the directory given by the moc_path variable and generates the corresponding cpp file. Use it as a dependency of SourceSet, Library or Executable so the resulting cpp files are automatically compiled and linked.</div>
<div style="margin-left:81px"><span class="label"><a name="12642">4.2.5.3.3</a></span>
Note that usually Q_OBJECT marked classes are in header files; if instead a .cpp file is added to <a href="#11885">sources</a> a c++ file with the same name but the suffix .moc is generated, which has to be included at the bottom of the .cpp file (see <a href="https://doc.qt.io/qt-5/moc.html"><u>the original Qt moc documentation</u></a> for more information).</div>
<h4 style="margin-left:63px"><span class="label"><a name="12635">4.2.5.4</a></span>
<b>Rcc</b></h4>
<div style="margin-left:81px"><span class="label"><a name="12636">4.2.5.4.1</a></span>
<b>Main</b>: <a href="#11885">sources</a>, <a href="#12819">tool_dir</a></div>
<div style="margin-left:81px"><span class="label"><a name="12637">4.2.5.4.2</a></span>
Calls the Qt <b>rcc</b> executable from <a href="#12819">tool_dir</a> or - if <a href="#12819">tool_dir</a> is '.' - from the directory given by the rcc_path variable and generates the corresponding cpp file. Use it as a dependency of SourceSet, Library or Executable so the resulting cpp files are automatically compiled and linked (see <a href="https://doc.qt.io/qt-5/rcc.html"><u>the original Qt rcc documentation</u></a> for more information).</div>
<h4 style="margin-left:63px"><span class="label"><a name="12940">4.2.5.5</a></span>
Uic</h4>
<div style="margin-left:81px"><span class="label"><a name="12941">4.2.5.5.1</a></span>
<b>Main</b>: <a href="#11885">sources</a>, <a href="#12819">tool_dir</a></div>
<div style="margin-left:81px"><span class="label"><a name="12942">4.2.5.5.2</a></span>
Calls the Qt <b>uic</b> executable from <a href="#12819">tool_dir</a> or - if <a href="#12819">tool_dir</a> is '.' - from the directory given by the uic_path variable and generates a header file corresponding to the user interface specification (see <a href="https://doc.qt.io/qt-5/uic.html"><u>the original Qt uic documentation</u></a> for more information). Usually build_dir() has to be added to the include_dirs of the product using the interface (i.e. which includes the generated header).</div>
<h4 style="margin-left:63px"><span class="label"><a name="11893">4.2.5.6</a></span>
<b>Copy</b></h4>
<div style="margin-left:81px"><span class="label"><a name="11904">4.2.5.6.1</a></span>
<b>Main</b>: <a href="#11885">sources</a>, <a href="#11907">outputs</a>, <a href="#12679">use_deps</a></div>
<div style="margin-left:81px"><span class="label"><a name="12682">4.2.5.6.2</a></span>
Copy the files explicitly listed in <a href="#11885">sources</a> or received from <a href="#11831">deps</a> (subject to the file types in <a href="#12679">use_deps</a>) to the places listed in <a href="#11907">outputs</a>. </div>
<div style="margin-left:81px"><span class="label"><a name="12683">4.2.5.6.3</a></span>
<a href="#11907">outputs</a> makes use of <a href="#12603">Source Expansion</a>; the place-holders <a href="#12610">{{source_file_part}}</a>, <a href="#12612">{{source_name_part}}</a> and <a href="#12621">{{source_ext}}</a> are available.</div>
<div style="margin-left:81px"><span class="label"><a name="12684">4.2.5.6.4</a></span>
<a href="#11885">sources</a> and <a href="#11907">outputs</a> can include as many files as you want; each entry in <a href="#11885">sources</a> is copied to all places in <a href="#11907">outputs</a>.</div>
<div style="margin-left:81px"><span class="label"><a name="12842">4.2.5.6.5</a></span>
The file system directories on the paths referenced by <a href="#11907">outputs</a> are recursively created if they don't exist yet.  </div>
<div style="margin-left:81px"><span class="label"><a name="12685">4.2.5.6.6</a></span><span class="ident">NOTE</span>
If the output file exists it is overwritten without warning.</div>
<h4 style="margin-left:9px"><span class="label"><a name="11697">5</a></span>
<b>Predeclared Field Reference</b></h4>
<h4 style="margin-left:27px"><span class="label"><a name="11917">5.1</a></span>
args</h4>
<div style="margin-left:45px"><span class="label"><a name="11918">5.1.1</a></span>
<b>args: string[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11919">5.1.2</a></span>
For <a href="#11679">LuaScript</a> and <a href="#11681">LuaScriptForeach</a> targets, args is the list of arguments to pass to the script. </div>
<h4 style="margin-left:27px"><span class="label"><a name="11698">5.2</a></span>
<b>cflags</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11701">5.2.1</a></span>
<b>cflags : string[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11699">5.2.2</a></span>
cflags are compiler flags passed to all invocations of the C, C++, Objective C, and Objective C++ compilers.</div>
<div style="margin-left:45px"><span class="label"><a name="11702">5.2.3</a></span>
Each element of the list is passed verbatim to the compiler in charge, i.e. cflags doesn't absctract away specific compiler command line syntax.</div>
<div style="margin-left:45px"><span class="label"><a name="11700">5.2.4</a></span>
To target one of these variants individually, use <a href="#11703">cflags_c</a>, <a href="#11705">cflags_cc</a>, <a href="#11707">cflags_objc</a>, and <a href="#11709">cflags_objcc</a>, respectively. These variant-specific versions of cflags* will be appended on the compiler command line after "cflags".</div>
<h4 style="margin-left:45px"><span class="label"><a name="11711">5.2.5</a></span>
<b>Order of application</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12818">5.2.5.1</a></span>
TODO: check and sync with implementation</div>
<div style="margin-left:63px"><span class="label"><a name="11714">5.2.5.2</a></span>
Those set on the current target (not in a config).</div>
<div style="margin-left:63px"><span class="label"><a name="11715">5.2.5.3</a></span>
Those set on the <a href="#11812">configs</a> on the product in order that the configs appear in the list. </div>
<h4 style="margin-left:27px"><span class="label"><a name="11703">5.3</a></span>
cflags_c</h4>
<div style="margin-left:45px"><span class="label"><a name="11704">5.3.1</a></span>
Like <a href="#11698">cflags</a>, but just used with C code.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11705">5.4</a></span>
cflags_cc</h4>
<div style="margin-left:45px"><span class="label"><a name="11706">5.4.1</a></span>
Like <a href="#11698">cflags</a>, but just used with C++ code.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11707">5.5</a></span>
cflags_objc</h4>
<div style="margin-left:45px"><span class="label"><a name="11708">5.5.1</a></span>
Like <a href="#11698">cflags</a>, but just used with Objective-C code (*.m files).</div>
<h4 style="margin-left:27px"><span class="label"><a name="11709">5.6</a></span>
<b>cflags_objcc</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11710">5.6.1</a></span>
Like <a href="#11698">cflags</a>, but just used with Objective-C++ (*.mm files)</div>
<h4 style="margin-left:27px"><span class="label"><a name="11812">5.7</a></span>
configs</h4>
<div style="margin-left:45px"><span class="label"><a name="11813">5.7.1</a></span>
<b>configs: Config[]</b></div>
<h4 style="margin-left:45px"><span class="label"><a name="11815">5.7.2</a></span>
configs on a <b>CompiledProduct</b></h4>
<div style="margin-left:63px"><span class="label"><a name="11816">5.7.2.1</a></span>
When used on a target, the <a href="#11757">include_dirs</a>, <a href="#11741">defines</a>, etc. in each config are appended in the order they appear to the compile command for each file in the target. They will appear after the include_dirs, defines, etc. that the target sets directly.</div>
<div style="margin-left:63px"><span class="label"><a name="11817">5.7.2.2</a></span>
Since configs apply after the values set on a target, directly setting a compiler flag will prepend it to the command line. If you want to append a flag instead, you can put that flag in a one-off config and append that config to the target's configs list.</div>
<h4 style="margin-left:45px"><span class="label"><a name="11819">5.7.3</a></span>
<b>configs on a Config</b></h4>
<div style="margin-left:63px"><span class="label"><a name="11820">5.7.3.1</a></span>
It is possible to create composite configs by specifying configs on a config. One might do this to forward values, or to factor out blocks of settings from very large configs into more manageable named chunks.</div>
<div style="margin-left:63px"><span class="label"><a name="11821">5.7.3.2</a></span>
In this case, the composite config is expanded to be the concatenation of its own values, and in order, the values from its sub-configs *before* anything else happens. This has some ramifications:</div>
<div style="margin-left:81px"><span class="label"><a name="11822">5.7.3.2.1</a></span>
A target has no visibility into a config's sub-configs. Target code only sees the name of the composite config. It can't remove sub-configs or opt in to only parts of it. </div>
<div style="margin-left:81px"><span class="label"><a name="11823">5.7.3.2.2</a></span>
You can get duplication of values if a config is listed twice, say, on a target and in a sub-config that also applies. In other cases, the configs applying to a target are de-duped. It's expected that if a config is listed as a sub-config that it is only used in that context. (Note that it's possible to fix this and de-dupe, but it's not normally relevant and complicates the implementation.)</div>
<div style="margin-left:45px"><span class="label"><a name="11824">5.7.4</a></span>
see <a href="#11711">Order of application</a></div>
<h4 style="margin-left:27px"><span class="label"><a name="11741">5.8</a></span>
defines</h4>
<div style="margin-left:45px"><span class="label"><a name="11759">5.8.1</a></span>
<b>defines: string[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11742">5.8.2</a></span>
string syntax "&lt;ident&gt; [ = &lt;value&gt; ]", so without the -D</div>
<div style="margin-left:45px"><span class="label"><a name="11743">5.8.3</a></span>
These strings will be passed to the C/C++ compiler as #defines. The strings may or may not include an "=" to assign a value.</div>
<div style="margin-left:45px"><span class="label"><a name="11748">5.8.4</a></span>
see <a href="#11711">Order of application</a></div>
<h4 style="margin-left:27px"><span class="label"><a name="11975">5.9</a></span>
def_file</h4>
<div style="margin-left:45px"><span class="label"><a name="11976">5.9.1</a></span>
<b>def_file: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="11977">5.9.2</a></span>
Optionally points to the .Def file when building a DLL on Windows.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11831">5.10</a></span>
deps</h4>
<div style="margin-left:45px"><span class="label"><a name="11832">5.10.1</a></span>
<b>deps: Product[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11833">5.10.2</a></span>
The deps field specifies compile-time dependencies of a Product instance. Products and dependencies must form a tree; cycles are not allowed. </div>
<div style="margin-left:45px"><span class="label"><a name="12817">5.10.3</a></span>
The dependency tree is processed depth-first. When processed, the results of each dependent Product instance are propagated up the dependency tree.</div>
<h4 style="margin-left:45px"><span class="label"><a name="11834">5.10.4</a></span>
<a href=""><b>D</b></a><b>etails of dependency propagation</b></h4>
<div style="margin-left:63px"><span class="label"><a name="12668">5.10.4.1</a></span>
The results of <a href="#11633">Executable</a>, <a href="#11662">Library</a>, <a href="#11647">SourceSet</a>, <a href="#11671">Group</a>, <a href="#12625">Moc</a>, <a href="#12635">Rcc</a>, <a href="#11679">LuaScript</a> and <a href="#11681">LuaScriptForeach</a> will be propagated up the dependency tree.</div>
<div style="margin-left:63px"><span class="label"><a name="12670">5.10.4.2</a></span>
<a href="#11671">Group</a> is special in that it just passes on all results of its dependencies.</div>
<div style="margin-left:63px"><span class="label"><a name="12671">5.10.4.3</a></span>
<a href="#11647">SourceSet</a> consumes sources from its dependencies and propagates object files up the dependency tree; object files and libraries from its dependencies are passed through.</div>
<div style="margin-left:63px"><span class="label"><a name="12672">5.10.4.4</a></span>
<a href="#11662">Library</a> consumes sources, object files and libraries from its dependencies and passes the resulting library up the dependency tree.</div>
<div style="margin-left:63px"><span class="label"><a name="12673">5.10.4.5</a></span>
<a href="#11633">Executable</a> consumes sources, object files and librarijes from its dependencies and passes the resulting executable up the dependency tree.</div>
<div style="margin-left:63px"><span class="label"><a name="12674">5.10.4.6</a></span>
<a href="#12625">Moc</a> and <a href="#12635">Rcc</a> don't consume or pass through anything from their dependencies, but pass the resulting source files up the dependency tree.</div>
<div style="margin-left:63px"><span class="label"><a name="12824">5.10.4.7</a></span>
<a href="#11679">LuaScript</a> and <a href="#11681">LuaScriptForeach</a> don't consume or pass through anything from their dependencies, but pass the source files listed in the <a href="#11907">outputs</a> field up the dependency tree, relative to the build directory.</div>
<div style="margin-left:63px"><span class="label"><a name="12677">5.10.4.8</a></span>
<a href="#11893">Copy</a> includes the file types listed in <a href="#12679">use_deps</a> from its dependencies in its source list, but doesn't pass anything up the dependency tree.</div>
<div style="margin-left:63px"><span class="label"><a name="12675">5.10.4.9</a></span>
<a href="#12590">Message</a> and <a href="#12940">Uic</a> don't consume or pass through anything from their dependencies.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11825">5.11</a></span>
frameworks</h4>
<div style="margin-left:45px"><span class="label"><a name="11826">5.11.1</a></span>
<b>frameworks: string[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11827">5.11.2</a></span>
Like <a href="#11799">lib_names</a>, but the names refer to Mac frameworks instead of static or dynamic libraries. In case the framework is referenced by file path use <a href="#11782">lib_files</a> instead. Only names are used, i.e. without the ".framework" suffix</div>
<div style="margin-left:45px"><span class="label"><a name="11828">5.11.3</a></span>
The switch "-framework" will be prepended instead of the lib_switch. This is to support the way Mac links framework dependencies.</div>
<div style="margin-left:45px"><span class="label"><a name="11829">5.11.4</a></span>
NOTE: in GN this is part of the libs field.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11757">5.12</a></span>
include_dirs</h4>
<div style="margin-left:45px"><span class="label"><a name="11760">5.12.1</a></span>
<b>include_dirs: path[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11758">5.12.2</a></span>
A list of source directories.</div>
<div style="margin-left:45px"><span class="label"><a name="11761">5.12.3</a></span>
The directories in this list will be added to the include path for the files in the affected target.</div>
<div style="margin-left:45px"><span class="label"><a name="11985">5.12.4</a></span>
Relative paths are always resolved relative to the module where the object was initially declared.</div>
<div style="margin-left:45px"><span class="label"><a name="11762">5.12.5</a></span>
see <a href="#11711">Order of application</a></div>
<h4 style="margin-left:27px"><span class="label"><a name="11772">5.13</a></span>
ldflags</h4>
<div style="margin-left:45px"><span class="label"><a name="11773">5.13.1</a></span>
<b>ldflags: string[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11774">5.13.2</a></span>
These flags are passed on the command-line to the linker and generally specify various linking options. Most targets will not need these and will use <a href="#11799">lib_names</a>, <a href="#11782">lib_files</a>, <a href="#11825">frameworks</a> and <a href="#11776">lib_dirs</a> instead.</div>
<div style="margin-left:45px"><span class="label"><a name="11775">5.13.3</a></span>
ldflags are NOT pushed to dependents, so applying ldflags to source sets or static libraries will be a no-op. If you want to apply ldflags to dependent targets, put them in a config and set it in the <a href="xoid://11878@003526b9-5a79-4133-afbf-9bcd57214e0c">&lt;null reference&gt;</a> or <a href="xoid://11865@003526b9-5a79-4133-afbf-9bcd57214e0c">&lt;null reference&gt;</a>.</div>
<div style="margin-left:45px"><span class="label"><a name="11777">5.13.4</a></span>
see <a href="#11711">Order of application</a></div>
<h4 style="margin-left:27px"><span class="label"><a name="11776">5.14</a></span>
<a href=""><b>l</b></a><b>ib_dirs</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11778">5.14.1</a></span>
<a href=""><b>l</b></a><b>ib_dirs: path[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11779">5.14.2</a></span>
Specifies additional directories passed to the linker for searching for the required libraries. If an item is not an absolute path, it will be treated as being relative to the current build file.</div>
<div style="margin-left:45px"><span class="label"><a name="11780">5.14.3</a></span>
<a href="#11799">lib_names</a><b>, </b><a href="#11782">lib_files</a><b>,</b> and lib_dirs work differently than other flags in two respects. First, they are inherited across static library boundaries until a shared library or executable target is reached. Second, they are uniquified so each one is only passed once (the first instance of it will be the one used).</div>
<div style="margin-left:45px"><span class="label"><a name="11783">5.14.4</a></span>
see <a href="#11711">Order of application</a></div>
<div style="margin-left:45px"><span class="label"><a name="11781">5.14.5</a></span>
For <a href="#11799">lib_names</a>, <a href="#11782">lib_files</a>, <a href="#11825">frameworks</a> and lib_dirs only, the values propagated from dependencies (as described above) are applied last assuming they are not already in the list.</div>
<div style="margin-left:45px"><span class="label"><a name="11986">5.14.6</a></span>
Relative paths are always resolved relative to the module where the object was initially declared.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11799">5.15</a></span>
<b>lib_names</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11800">5.15.1</a></span>
<b>lib_names: string[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11801">5.15.2</a></span>
A list of library names. NOTE: in GN both lib_names and lib_files are unified in the libs field.</div>
<div style="margin-left:45px"><span class="label"><a name="11830">5.15.3</a></span>
Only the plain name of the library is used, i.e. without the lib prefix or the .lib or whatever suffix.</div>
<div style="margin-left:45px"><span class="label"><a name="11802">5.15.4</a></span>
These libraries will be linked into the final binary (executable or shared library) containing the current target.</div>
<div style="margin-left:45px"><span class="label"><a name="11803">5.15.5</a></span><a href="#11780">&#x21B3;</a>
<a href="#11799">lib_names</a><b>, </b><a href="#11782">lib_files</a><b>,</b> and lib_dirs work differently than other flags in two respects. First, they are inherited across static library boundaries until a shared library or executable target is reached. Second, they are uniquified so each one is only passed once (the first instance of it will be the one used).</div>
<div style="margin-left:45px"><span class="label"><a name="11809">5.15.6</a></span>
The names will be passed unmodified to the linker and prefixed with the "lib_switch" attribute of the linker tool. Generally you would set the "lib_dirs" so the given library is found. Your BUSY file should not specify the switch (like "-l"): this will be encoded in the "lib_switch" of the tool. </div>
<h4 style="margin-left:27px"><span class="label"><a name="11782">5.16</a></span>
<b>lib_files</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11784">5.16.1</a></span>
<b>lib_files: path[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11785">5.16.2</a></span>
A list of library paths.</div>
<div style="margin-left:45px"><span class="label"><a name="11786">5.16.3</a></span>
These libraries will be linked into the final binary (executable or shared library) containing the current target.</div>
<div style="margin-left:45px"><span class="label"><a name="11788">5.16.4</a></span><a href="#11780">&#x21B3;</a>
<a href="#11799">lib_names</a><b>, </b><a href="#11782">lib_files</a><b>,</b> and lib_dirs work differently than other flags in two respects. First, they are inherited across static library boundaries until a shared library or executable target is reached. Second, they are uniquified so each one is only passed once (the first instance of it will be the one used).</div>
<div style="margin-left:45px"><span class="label"><a name="11987">5.16.5</a></span>
Relative paths are always resolved relative to the module where the object was initially declared.</div>
<h4 style="margin-left:45px"><span class="label"><a name="11789">5.16.6</a></span>
Types of libs</h4>
<div style="margin-left:63px"><span class="label"><a name="11792">5.16.6.1</a></span>
File paths</div>
<div style="margin-left:81px"><span class="label"><a name="11793">5.16.6.1.1</a></span>
They will be rebased to be relative to the build directory and specified in the "libs" for linker tools. This facility should be used for libraries that are checked in to the version control. For libraries that are generated by the build, use normal deps to link them.</div>
<div style="margin-left:63px"><span class="label"><a name="11797">5.16.6.2</a></span>
Apple frameworks</div>
<div style="margin-left:81px"><span class="label"><a name="11798">5.16.6.2.1</a></span>
System libraries ending in ".framework" will be special-cased: the switch "-framework" will be prepended instead of the lib_switch, and the ".framework" suffix will be trimmed. This is to support the way Mac links framework dependencies.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11962">5.17</a></span>
lib_type</h4>
<div style="margin-left:45px"><span class="label"><a name="11963">5.17.1</a></span>
<b>lib_type : LibraryType</b></div>
<div style="margin-left:45px"><span class="label"><a name="11964">5.17.2</a></span>
Specifies the library type, e.g. whether it is a static or dynamic library.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12593">5.18</a></span>
msg_type</h4>
<div style="margin-left:45px"><span class="label"><a name="12594">5.18.1</a></span>
<b>msg_type : MessageType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12595">5.18.2</a></span>
Specifies the type of the Message instance</div>
<h4 style="margin-left:27px"><span class="label"><a name="11978">5.19</a></span>
<b>name</b></h4>
<div style="margin-left:45px"><span class="label"><a name="11979">5.19.1</a></span>
<b>name: string</b></div>
<div style="margin-left:45px"><span class="label"><a name="11980">5.19.2</a></span>
An optional name to be used to generate the file name of the product. If name is empty then the name of the variable declaration is used.</div>
<div style="margin-left:45px"><span class="label"><a name="12724">5.19.3</a></span>
Watch out that names set using this variable don't collide with the names of other Executables or Libraries in the same module.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11907">5.20</a></span>
outputs</h4>
<div style="margin-left:45px"><span class="label"><a name="11908">5.20.1</a></span>
<b>outputs: path[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11909">5.20.2</a></span>
The <a href="#11907">outputs</a> list is available for <a href="#11893">Copy</a>, <a href="#11679">LuaScript</a> and <a href="#11681">LuaScriptForeach</a> product types and indicates the resulting files. The paths added to the <a href="#11907">outputs</a> list always refer to files in the build directory.</div>
<div style="margin-left:45px"><span class="label"><a name="12822">5.20.3</a></span><span class="ident">NOTE</span>
For security reasons <a href="#11907">outputs</a> only accepts relative paths.</div>
<div style="margin-left:45px"><span class="label"><a name="11910">5.20.4</a></span>
<a href="#11893">Copy</a></div>
<div style="margin-left:63px"><span class="label"><a name="11911">5.20.4.1</a></span>
Copy targets should have exactly one entry in the outputs list. If there is exactly one source, this can be a literal file name or a <a href="#12603">Source Expansion</a>. If there is more than one source, this must contain a <a href="#12603">Source Expansion</a> to map a single input name to a single output name. </div>
<div style="margin-left:63px"><span class="label"><a name="12845">5.20.4.2</a></span>
The paths added to the <a href="#11907">outputs</a> list are relative to root_build_dir. This can be used to add known places in an otherwise implementation specific (i.e. non-deterministic) build tree.</div>
<div style="margin-left:45px"><span class="label"><a name="12843">5.20.5</a></span>
<a href="#11679">LuaScript</a> and <a href="#11681">LuaScriptForeach</a></div>
<div style="margin-left:63px"><span class="label"><a name="12844">5.20.5.1</a></span>
The paths added to the <a href="#11907">outputs</a> list are relative to where the specific product declaration is represented in the build directory. This location is implementation specific. It could correspond to the result of build_dir(), but there is no guarantee.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11901">5.21</a></span>
script</h4>
<div style="margin-left:45px"><span class="label"><a name="11902">5.21.1</a></span>
<b>script: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="11903">5.21.2</a></span>
An absolute or buildfile-relative file name of a Lua script to run for action and action_foreach targets (see <a href="#11679">LuaScript</a> and <a href="#11681">LuaScriptForeach</a>).</div>
<h4 style="margin-left:27px"><span class="label"><a name="11885">5.22</a></span>
sources</h4>
<div style="margin-left:45px"><span class="label"><a name="11886">5.22.1</a></span>
<b>sources: path[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="11887">5.22.2</a></span>
A list of files. Non-absolute paths will be resolved relative to the current BUSY file (i.e. if you reference sources with relative paths from another BUSY file they will likely point to the wrong place).</div>
<h4 style="margin-left:45px"><span class="label"><a name="11888">5.22.3</a></span>
<a href=""><b>S</b></a><b>ources for binary targets</b></h4>
<div style="margin-left:63px"><span class="label"><a name="11889">5.22.3.1</a></span>
For binary targets (source sets, executables, and libraries), the known file types will be compiled with the associated tools. Unknown file types and headers will be skipped. However, you should still list all C/C+ header files so GN knows about the existence of those files for the purposes of include checking.</div>
<div style="margin-left:63px"><span class="label"><a name="11890">5.22.3.2</a></span>
As a special case, a file ending in ".def" will be treated as a Windows module definition file. It will be appended to the link line with a preceding "/DEF:" string. There must be at most one .def file in a target and they do not cross dependency boundaries (so specifying a .def file in a static library or source set will have no effect on the executable or shared library they're linked into).</div>
<h4 style="margin-left:45px"><span class="label"><a name="11891">5.22.4</a></span>
<b>Sources for actions</b></h4>
<div style="margin-left:63px"><span class="label"><a name="11895">5.22.4.1</a></span>
<a href="#11681">LuaScriptForeach</a></div>
<div style="margin-left:81px"><span class="label"><a name="11900">5.22.4.1.1</a></span>
The sources are the set of files that the script will be executed over. The script will run once per file.</div>
<div style="margin-left:63px"><span class="label"><a name="11896">5.22.4.2</a></span>
<a href="#11893">Copy</a></div>
<div style="margin-left:81px"><span class="label"><a name="11898">5.22.4.2.1</a></span>
The source are the source files to copy.</div>
<div style="margin-left:63px"><span class="label"><a name="12628">5.22.4.3</a></span>
<a href="#12625">Moc</a>, <a href="#12635">Rcc</a> and <a href="#12940">Uic</a></div>
<div style="margin-left:81px"><span class="label"><a name="12629">5.22.4.3.1</a></span>
The sources are the files which have to be processed by moc, rcc or uic.</div>
<h4 style="margin-left:45px"><span class="label"><a name="12603">5.22.5</a></span>
Source Expansion</h4>
<div style="margin-left:63px"><span class="label"><a name="12605">5.22.5.1</a></span>
Source expansion is used for the <a href="#11681">LuaScriptForeach</a>, <a href="#11679">LuaScript</a> and <a href="#11893">Copy</a> action types. Paths or strings can include one or more of the following placeholders. The result is the string representation of the path, as if <a href="#12001">tostring</a> would have been called.</div>
<h4 style="margin-left:63px"><span class="label"><a name="12607">5.22.5.2</a></span>
Placeholders</h4>
<div style="margin-left:81px"><span class="label"><a name="12608">5.22.5.2.1</a></span>
<pre><code>{{source}}</code></pre></div>
<div style="margin-left:99px"><span class="label"><a name="12609">5.22.5.2.1.1</a></span>
The absolute path of the source file. </div>
<div style="margin-left:81px"><span class="label"><a name="12610">5.22.5.2.2</a></span>
<pre><code>{{source_file_part}}</code></pre></div>
<div style="margin-left:99px"><span class="label"><a name="12611">5.22.5.2.2.1</a></span>
The file part of the source including the extension, e.g. "//foo/bar/baz.txt" =&gt; "baz.txt"</div>
<div style="margin-left:81px"><span class="label"><a name="12612">5.22.5.2.3</a></span>
<pre><code>{{source_name_part}}</code></pre></div>
<div style="margin-left:99px"><span class="label"><a name="12613">5.22.5.2.3.1</a></span>
The filename part of the source file with no path or extension. e.g. "//foo/bar/baz.tar.gz" =&gt; "baz.tar"</div>
<div style="margin-left:81px"><span class="label"><a name="12614">5.22.5.2.4</a></span>
<pre><code>{{source_dir}}</code></pre></div>
<div style="margin-left:99px"><span class="label"><a name="12622">5.22.5.2.4.1</a></span>
The absolute path of the directory containing the source file with no trailing slash, e.g. "//foo/bar/baz.txt" =&gt; "/foo/bar"</div>
<div style="margin-left:81px"><span class="label"><a name="12621">5.22.5.2.5</a></span>
<pre><code>{{source_ext}}</code></pre></div>
<div style="margin-left:99px"><span class="label"><a name="12615">5.22.5.2.5.1</a></span>
The extension of the source file including the dot, e.g. "//foo/bar/baz.tar.gz" =&gt; ".gz"</div>
<div style="margin-left:81px"><span class="label"><a name="12835">5.22.5.2.6</a></span>
<code>{{root_build_dir}}</code></div>
<div style="margin-left:99px"><span class="label"><a name="12836">5.22.5.2.6.1</a></span>
The string representation of the root file system directory of the build tree.</div>
<div style="margin-left:81px"><span class="label"><a name="12837">5.22.5.2.7</a></span>
<code>{{current_build_dir}}</code></div>
<div style="margin-left:99px"><span class="label"><a name="12838">5.22.5.2.7.1</a></span>
The string representation of the file system directory associated with the current instance of <a href="#11681">LuaScriptForeach</a> and <a href="#11679">LuaScript</a>. </div>
<h4 style="margin-left:27px"><span class="label"><a name="12597">5.23</a></span>
text</h4>
<div style="margin-left:45px"><span class="label"><a name="12598">5.23.1</a></span>
<b>text : string</b></div>
<div style="margin-left:45px"><span class="label"><a name="12599">5.23.2</a></span>
An arbitrary string to be displayed</div>
<h4 style="margin-left:27px"><span class="label"><a name="12819">5.24</a></span>
<b>tool_dir</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12820">5.24.1</a></span>
<b>tool_dir: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="12821">5.24.2</a></span>
An absolute path to the directory where the executable of a specific tool is located. Defaults to '.' which means the tool is accessible on the operating system search path. </div>
<h4 style="margin-left:27px"><span class="label"><a name="12679">5.25</a></span>
<b>use_deps</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12680">5.25.1</a></span>
<b>use_deps: FileType[]</b></div>
<div style="margin-left:45px"><span class="label"><a name="12681">5.25.2</a></span>
A list of file types to be consumed from the dependencies; currently only used by <a href="#11893">Copy</a>.</div>
<h4 style="margin-left:9px"><span class="label"><a name="11934">6</a></span>
<b>Predeclared Enumeration Reference</b></h4>
<div style="margin-left:27px"><span class="label"><a name="12945">6.1</a></span>
<b>type BuildMode = ( `optimized `nonoptimized `debug )</b></div>
<div style="margin-left:27px"><span class="label"><a name="11935">6.2</a></span>
<b>type LibraryType = ( `static, `shared, `framework )</b></div>
<div style="margin-left:45px"><span class="label"><a name="12690">6.2.1</a></span>
Used by <a href="#11962">lib_type</a> to control what kind of library is beeing built by a given <a href="#11662">Library</a> instance.</div>
<div style="margin-left:27px"><span class="label"><a name="11936">6.3</a></span>
<b>type OsType = ( `darwin, `macos, `win32, ... )</b></div>
<div style="margin-left:45px"><span class="label"><a name="12692">6.3.1</a></span>
The type of the OS as identified when compiling BUSY.</div>
<div style="margin-left:27px"><span class="label"><a name="11937">6.4</a></span>
<b>type CpuType = ( `arm, `x86, ... )</b></div>
<div style="margin-left:45px"><span class="label"><a name="12693">6.4.1</a></span>
The CPU architecture as identified when compiling BUSY.</div>
<div style="margin-left:27px"><span class="label"><a name="11938">6.5</a></span>
<b>type WordSize = ( `16, `32, `64, `128 )</b></div>
<div style="margin-left:45px"><span class="label"><a name="12695">6.5.1</a></span>
An attribute of the CPU type; corresponds to the pointer byte width of the given CPU.</div>
<div style="margin-left:27px"><span class="label"><a name="11939">6.6</a></span>
<b>type CompilerType = ( `msvc, `gcc, `clang )</b></div>
<div style="margin-left:27px"><span class="label"><a name="12592">6.7</a></span>
<b>type MessageType = ( `error, `warning, `info )</b></div>
<div style="margin-left:27px"><span class="label"><a name="12678">6.8</a></span>
<b>type FileType = ( `object_file, `source_file, `static_lib, `shared_lib, `executable )</b></div>
<div style="margin-left:45px"><span class="label"><a name="12694">6.8.1</a></span>
Possible output file types as generated by the build and transmitted along the dependency chain.</div>
<h4 style="margin-left:9px"><span class="label"><a name="11920">7</a></span>
<b>Predeclared Variable Reference</b></h4>
<div style="margin-left:27px"><span class="label"><a name="12947">7.1</a></span>
<b>let build_mode: BuildMode</b></div>
<div style="margin-left:45px"><span class="label"><a name="12948">7.1.1</a></span>
An explicit value can be set e.g. via command line options; if not explicitly set <b>`optimized</b> is assumed.</div>
<div style="margin-left:27px"><span class="label"><a name="12574">7.2</a></span>
<b>let busy_version: string</b></div>
<div style="margin-left:27px"><span class="label"><a name="11921">7.3</a></span>
<b>let host_cpu: CpuType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12654">7.3.1</a></span>
The CPU detected when BUSY is compiled</div>
<div style="margin-left:27px"><span class="label"><a name="11922">7.4</a></span>
<b>let host_cpu_ver: int</b></div>
<div style="margin-left:45px"><span class="label"><a name="12655">7.4.1</a></span>
The CPU version detected when BUSY is compiled</div>
<div style="margin-left:27px"><span class="label"><a name="11923">7.5</a></span>
<b>let host_wordsize: WordSize</b></div>
<div style="margin-left:45px"><span class="label"><a name="12656">7.5.1</a></span>
The word size used to compile BUSY</div>
<div style="margin-left:27px"><span class="label"><a name="11924">7.6</a></span>
<b>let host_os: OsType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12657">7.6.1</a></span>
The OS detected when BUSY is compiled</div>
<div style="margin-left:27px"><span class="label"><a name="11925">7.7</a></span>
<b>let host_toolchain: CompilerType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12658">7.7.1</a></span>
The toolchain used to compile BUSY</div>
<div style="margin-left:27px"><span class="label"><a name="11926">7.8</a></span>
<b>let host_toolchain_ver: int</b></div>
<div style="margin-left:45px"><span class="label"><a name="12659">7.8.1</a></span>
The version of the toolchain used to compile BUSY</div>
<div style="margin-left:27px"><span class="label"><a name="11933">7.9</a></span>
<b>let root_build_dir: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="12660">7.9.1</a></span>
The path where the build results are saved; either a default value or an explicit value set via command line options</div>
<div style="margin-left:27px"><span class="label"><a name="12034">7.10</a></span>
<b>let root_source_dir: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="12661">7.10.1</a></span>
The path of the source tree root directory; either a default value or an explicit value set via command line options</div>
<div style="margin-left:27px"><span class="label"><a name="12632">7.11</a></span>
<b>var moc_path: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="12652">7.11.1</a></span>
The absolute file system directory path where the moc executable is supposed to be. If the path is '.' then the tool is assumed to be on the operating system search path and called with no directory prefix.</div>
<div style="margin-left:27px"><span class="label"><a name="12633">7.12</a></span>
<b>var rcc_path: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="12653">7.12.1</a></span>
The absolute file system directory path where the rcc executable is supposed to be. If the path is '.' then the tool is assumed to be on the operating system search path and called with no directory prefix.</div>
<div style="margin-left:27px"><span class="label"><a name="12943">7.13</a></span>
<b>var uic_path: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="12944">7.13.1</a></span>
The absolute file system directory path where the uic executable is supposed to be. If the path is '.' then the tool is assumed to be on the operating system search path and called with no directory prefix.</div>
<div style="margin-left:27px"><span class="label"><a name="11927">7.14</a></span>
<b>param target_cpu: CpuType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12646">7.14.1</a></span>
initialized with host_cpu</div>
<div style="margin-left:27px"><span class="label"><a name="11928">7.15</a></span>
<b>param target_cpu_ver: int</b></div>
<div style="margin-left:45px"><span class="label"><a name="12647">7.15.1</a></span>
initialized with host_cpu_ver</div>
<div style="margin-left:27px"><span class="label"><a name="11929">7.16</a></span>
<b>param target_wordsize: WordSize</b></div>
<div style="margin-left:45px"><span class="label"><a name="12648">7.16.1</a></span>
initialized with host_wordsize</div>
<div style="margin-left:27px"><span class="label"><a name="11930">7.17</a></span>
<b>param target_os: OsType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12649">7.17.1</a></span>
initialized with host_os</div>
<div style="margin-left:27px"><span class="label"><a name="11931">7.18</a></span>
<b>param target_toolchain: CompilerType</b></div>
<div style="margin-left:45px"><span class="label"><a name="12650">7.18.1</a></span>
initialized with host_toolchain</div>
<div style="margin-left:27px"><span class="label"><a name="11932">7.19</a></span>
<b>param target_toolchain_ver: int</b></div>
<div style="margin-left:45px"><span class="label"><a name="12651">7.19.1</a></span>
initialized with host_toolchain_ver</div>
<div style="margin-left:27px"><span class="label"><a name="13024">7.20</a></span>
<b>param target_toolchain_path: path</b></div>
<div style="margin-left:45px"><span class="label"><a name="13025">7.20.1</a></span>
initialized with '.'; if set to another path than '.' then the tool name is prefixed with the path (e.g. "path" + "gcc").</div>
<div style="margin-left:27px"><span class="label"><a name="13026">7.21</a></span>
<b>param target_toolchain_prefix: string</b></div>
<div style="margin-left:45px"><span class="label"><a name="13027">7.21.1</a></span>
initialized with the empty string; the tool name is prefixes with this string (e.g. "xtensa-esp32-elf-" + "gcc").</div>
<h4 style="margin-left:9px"><span class="label"><a name="11996">8</a></span>
<b>Predeclared Procedure Reference</b></h4>
<h4 style="margin-left:27px"><span class="label"><a name="12007">8.1</a></span>
abspath</h4>
<div style="margin-left:45px"><span class="label"><a name="12008">8.1.1</a></span>
<b>abspath(): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12009">8.1.1.1</a></span>
Returns the absolute file system path associated with the current module.</div>
<div style="margin-left:45px"><span class="label"><a name="12010">8.1.2</a></span>
<b>abspath(p: path): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12011">8.1.2.1</a></span>
Returns the absolute file system path of p relative to the path associated with the current module, or p if already absolute.</div>
<div style="margin-left:45px"><span class="label"><a name="12012">8.1.3</a></span>
<b>abspath(m: module): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12013">8.1.3.1</a></span>
Returns the absolute file system path associated with the designated module.</div>
<div style="margin-left:45px"><span class="label"><a name="12015">8.1.4</a></span>
<b>abspath(m: module; p: path): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12016">8.1.4.1</a></span>
Returns the absolute file system path of p relative to the path associated with the designated module.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12643">8.2</a></span>
build_dir</h4>
<div style="margin-left:45px"><span class="label"><a name="12644">8.2.1</a></span>
<b>build_dir(): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12645">8.2.1.1</a></span>
The result corresponds to <code>root_build_dir + relpath()</code></div>
<div style="margin-left:45px"><span class="label"><a name="12846">8.2.2</a></span><span class="ident">NOTE</span>
This function should be used with care because the structure of the build directory is implementation specific; there is no guarantee that build_dir() point to a valid path. Consider using <a href="#11893">Copy</a> to copy executables and libraries to a known place in the build tree and use paths relative to <code>root_build_dir</code>.</div>
<h4 style="margin-left:27px"><span class="label"><a name="13028">8.3</a></span>
cross_compiling</h4>
<div style="margin-left:45px"><span class="label"><a name="13029">8.3.1</a></span>
cross_compiling():bool</div>
<div style="margin-left:45px"><span class="label"><a name="13030">8.3.2</a></span>
This is a convenience function which just returns the following expression:</div>
<div style="margin-left:63px"><span class="label"><a name="13031">8.3.2.1</a></span>
<code>(host_cpu != target_cpu) || (host_os != target_os) || (host_wordsize != target_wordsize) || (host_toolchain != target_toolchain) || (target_toolchain_prefix != "")</code></div>
<h4 style="margin-left:27px"><span class="label"><a name="12006">8.4</a></span>
dump</h4>
<div style="margin-left:45px"><span class="label"><a name="12391">8.4.1</a></span>
This procedure is for debugging purpose. It expects one or two arguments. The first argument can be of any type; its type and value are printed to the console. The optional second argument is a string printed to the console.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12004">8.5</a></span>
error</h4>
<div style="margin-left:45px"><span class="label"><a name="12392">8.5.1</a></span>
Expects one or more string arguments. Prints the concatenated arguments to the console (stderr) and halts the program.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12005">8.6</a></span>
message</h4>
<div style="margin-left:45px"><span class="label"><a name="12393">8.6.1</a></span>
Expects one or more string arguments. Prints the concatenated arguments to the console (stdout).</div>
<h4 style="margin-left:27px"><span class="label"><a name="12709">8.7</a></span>
modname</h4>
<div style="margin-left:45px"><span class="label"><a name="12715">8.7.1</a></span>
Returns the hierarchical name of the module (similar to <a href="#12014">relpath</a>); the module associated with the root of the source tree is represented by the name of the corresponding file system directory; each successive name segment corresponds to the identifier used in the <b>submod</b> declaration in the corresponding BUSY file.</div>
<div style="margin-left:45px"><span class="label"><a name="12711">8.7.2</a></span>
<b>modname(): string</b></div>
<div style="margin-left:63px"><span class="label"><a name="12712">8.7.2.1</a></span>
Returns the hierarchical name relative to the module associated with the root directory of the source tree.</div>
<div style="margin-left:45px"><span class="label"><a name="12713">8.7.3</a></span>
<b>modname(m: module): string</b></div>
<div style="margin-left:63px"><span class="label"><a name="12714">8.7.3.1</a></span>
Returns the hierarchical name of the designated module relative to the module associated with the root directory of the source tree.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12050">8.8</a></span>
<b>readstring</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12051">8.8.1</a></span>
<b>readstring(from: path): string</b></div>
<div style="margin-left:63px"><span class="label"><a name="12052">8.8.1.1</a></span>
Read the given file as UTF-8 string. Double quotes and \ are replaced by \" and \\. Line breaks and the like are replaced by space. Leading and trailing white space (blanks, line breaks) is stripped. The maximum supported file lengh is limited to 16'000 bytes.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12014">8.9</a></span>
<b>relpath</b></h4>
<div style="margin-left:45px"><span class="label"><a name="12546">8.9.1</a></span>
The returned path is a logical path; the module associated with the root of the source tree is represented by '.'; each successive name segment corresponds to the identifier used in the <b>submod</b> declaration; there is no requirement that the physical directory hierarchy is congruent with the module hierarchy; see <a href="#12169">3.10 Modules</a> for more information.</div>
<div style="margin-left:45px"><span class="label"><a name="12019">8.9.2</a></span>
<b>relpath(): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12017">8.9.2.1</a></span>
Returns the path relative to the module associated with the root directory of the source tree.</div>
<div style="margin-left:45px"><span class="label"><a name="12020">8.9.3</a></span>
<b>relpath(m: module): path</b></div>
<div style="margin-left:63px"><span class="label"><a name="12021">8.9.3.1</a></span>
Returns the path of the designated module relative to the module associated with the root directory of the source tree.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11997">8.10</a></span>
samelist</h4>
<div style="margin-left:45px"><span class="label"><a name="12395">8.10.1</a></span>
Expects two arguments of the same list type and compares their elements one by one in order. Returns <b>false</b>, if the elements or their number differ, and <b>true</b> otherwise.</div>
<h4 style="margin-left:27px"><span class="label"><a name="11998">8.11</a></span>
sameset</h4>
<div style="margin-left:45px"><span class="label"><a name="12396">8.11.1</a></span>
Expects two arguments of the same list type and compares their elements. The lists are treated like sets, i.e. the order of elements is insignificant and multiple copies of the same element are counted as one. Returns <b>true</b>, if both lists contain the same elements, <b>false</b> otherwise.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12749">8.12</a></span>
set_defaults</h4>
<div style="margin-left:45px"><span class="label"><a name="12750">8.12.1</a></span>
<b>set_defaults(CompilerType,Config)</b></div>
<div style="margin-left:45px"><span class="label"><a name="12751">8.12.2</a></span>
Set the default configuration per toolchain. This is useful to avoid cluttering generic flags around BUSY files, or to e.g. control level of optimization. </div>
<div style="margin-left:45px"><span class="label"><a name="12753">8.12.3</a></span>
The defaults should be kept as minimal as possible. A library should best not set the defaults at all. The defaults should not be used to select release or debug builds; instead the build_mode predeclared variable should be considered to decide which defaults to set (if at all).</div>
<h4 style="margin-left:27px"><span class="label"><a name="11999">8.13</a></span>
toint</h4>
<div style="margin-left:45px"><span class="label"><a name="12397">8.13.1</a></span>
Expects one argument of real type and returns the largest int less than or equal to a given real.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12000">8.14</a></span>
toreal</h4>
<div style="margin-left:45px"><span class="label"><a name="12398">8.14.1</a></span>
Expects one argument of int type and returns the same number as real type.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12001">8.15</a></span>
tostring</h4>
<div style="margin-left:45px"><span class="label"><a name="12399">8.15.1</a></span>
Expects one argument of base or enumeration type und returns the string representation or the argument.</div>
<div style="margin-left:45px"><span class="label"><a name="12400">8.15.2</a></span>
For bool type the strings "true" or "false" are returned.</div>
<div style="margin-left:45px"><span class="label"><a name="12401">8.15.3</a></span>
For path types, a <code>'//'</code> prefix is changed to "/" and for a <code>// letter ':'</code> prefix is changed the two leading slashes are removed.</div>
<div style="margin-left:45px"><span class="label"><a name="12402">8.15.4</a></span>
For symbols only the string part without <code>`</code> prefix is returned.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12002">8.16</a></span>
topath</h4>
<div style="margin-left:45px"><span class="label"><a name="12403">8.16.1</a></span>
Expects one argument of type string. Tries to convert the string into a normalized representation as specified in <a href="#12080">3.3.8 Paths</a>. If that succeeds, the path is returned, otherwise the execution halts with an error.</div>
<h4 style="margin-left:27px"><span class="label"><a name="12441">8.17</a></span>
trycompile</h4>
<div style="margin-left:45px"><span class="label"><a name="12450">8.17.1</a></span>
This function compiles C code (without linking). Returns true, if the compiler returns with no error, false otherwise. The following versions of the function are available:</div>
<div style="margin-left:63px"><span class="label"><a name="12868">8.17.1.1</a></span>
TODO: consider including linking and libs</div>
<div style="margin-left:45px"><span class="label"><a name="12442">8.17.2</a></span>
<b>trycompile(code:string):bool</b></div>
<div style="margin-left:45px"><span class="label"><a name="12452">8.17.3</a></span>
<b>trycompile(code: string; defines: string[]):bool</b></div>
<div style="margin-left:45px"><span class="label"><a name="12453">8.17.4</a></span>
<b>trycompile(code: string; defines: string[]; include_dirs: path[]):bool</b></div>
<div style="margin-left:45px"><span class="label"><a name="12443">8.17.5</a></span>
<b>trycompile(code: string; defines: string[]; include_dirs: path[]; cflags: string[]):bool</b></div>
<h4 style="margin-left:27px"><span class="label"><a name="12003">8.18</a></span>
warning</h4>
<div style="margin-left:45px"><span class="label"><a name="12394">8.18.1</a></span>
Expects one or more string arguments. Prints the concatenated arguments to the console (stderr).</div>
</body></html>